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 trialDaniel Atonge
4,769 PointsCan't complete code challenge
Oops! It looks like Task 2 is not responding. I have compiled over and over but nothing seems to be working.
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullname = $firstName .' ' .$lastName;
$fullname .= " was the original creator of PHP \n";
echo $fullname ;
?>
3 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Daniel,
You're really close. There are just two things.
- Right now, you are re-assigning the to the value of
$fullName
. This is overwriting the original and correct value on the line above it. So, all you really need is to combine the return statement and the re-assignment into a single line (Hint: it will start withreturn
and need some concatenation). - Second, and this is just because the code checker and challenges are very picky and very specific... You have a space between PHP and the
\n
.
Fix those up and you're all good to go. :)
Keep Coding!
Daniel Atonge
4,769 PointsThanks. It still refused. Bummer! You have not displayed the correct string
Jason Anders
Treehouse Moderator 145,860 PointsHey Daniel,
With the corrections, it should pass. Here is the corrected code for you to compare to yours. Hope that helps you figure things out. :)
<?php
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullname = $firstName . ' ' . $lastName;
echo $fullname . " was the original creator of PHP\n";
?>
Daniel Atonge
4,769 PointsThanks.