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 trialAbe Abdelmagid
3,181 Pointswhat is wrong here ?
I got oops
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullname = 'Rasmus Lendrof';
$fullname = $firstName .' '.$lastName.
$fullname = $fullname . " was the original creator of PHP" . "\n" ;
?>
3 Answers
Greg Kaleka
39,021 PointsHi there,
You're very close! There are a few issues with your code. I've added comments below.
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullname = 'Rasmus Lendrof'; // this is cheating! delete this line of code
$fullname = $firstName .' '.$lastName. // This is right but end your line with a ; and not a .
$fullname = $fullname . " was the original creator of PHP" . "\n" ; // instructions say to display to the screen
?>
So with those minor tweaks we end up with:
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullname = $firstName . ' ' . $lastName;
echo($fullname . " was the original creator of PHP" . "\n");
?>
Hope that makes sense.
Cheers
-Greg
Umesh Ravji
42,386 Points$fullname = 'Rasmus Lendrof';
Remove this line, you are using $firstName and $lastName to create this variable.
$fullname = $firstName .' '.$lastName.
Dot at the end instead of semicolon.
$fullname = $fullname . " was the original creator of PHP" . "\n" ;
At the end you are supposed to display the result, not place it into the variable.
Abe Abdelmagid
3,181 PointsThanks Umesh
Eric Breuers
Courses Plus Student 19,270 PointsSorry Abe, I haven't been on in a while. It looks like Greg has you covered! :)
Abe Abdelmagid
3,181 PointsAbe Abdelmagid
3,181 PointsThanks Greg