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 trialChris Ard
8,796 PointsCan't get past step 3. PHP is displaying properly.
Maybe I'm missing something, but I feel like I've followed the instructions to a tee but cannot pass. Am I doing something wrong? See below:
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = "$firstName " . "$lastName " . 'was the original creator of PHP' . "\n";
echo $fullName;
?>
Chris Ard
8,796 PointsHey Bryce,
Thanks for that. I played around with this earlier yesterday and figured it out as well. I believe the issue was that I did everything under the one variable, instead of concatenating and then appending the extra text afterwards like you said:
$fullName = "$firstName " . "$lastName";
echo "$fullName was the original creator of PHP \n";
2 Answers
Bryce Santos
11,157 PointsAlso you need to use $fullName in the string.
$fullName = "$firstName " . "$lastName";
echo "$fullName was the original creator of PHP \n";
Bryce Santos
11,157 PointsFunny thing, I JUST had a problem with this as well. It actually doesn't want you to concatenate at all. Just write out the string! Hahaha!
Julian Perry
2,186 PointsJulian Perry
2,186 PointsThis is valid PHP code and runs without errors on my side. Best of luck getting this sorted out.