Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLuis Magaña
13,042 PointsNot sure what I'm doing wrong here, using dot concatenation and variables with no quotes??
Not sure what I'm doing wrong here, using dot concatenation and variables with no quotes?? Tasks wants us to create a third variable using the two previous variables we just made.
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . $lastName;
?>
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! You're doing well, but the best hint is in the Bummer message! Take a look:
Bummer! It looks like you forgot to add a space between the first and last name.
Right now, you're concatenating the first name and the last name, but you've not included a space anywhere in there, The current value of $fullName
is not "Rasmus Lerdorf" but rather "RasmusLerdorf". You will need to account for the missing space.
Hope this helps!
edited for additional hint
Also, there is no requirement here to use concatenation. You are free to use the double quotes to expand the values of the variables in place
Luis Magaña
13,042 PointsI'll take a hard look at your hint and I got through this with your help, thanks!