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 trial

PHP PHP Basics Daily Exercise Program String Manipulation

iuliana sagaidak
iuliana sagaidak
4,797 Points

Example Output: Rasmus Lerdorf was the original creator of PHP

Hi there! Can you help me with this? I try a lot of options, using dot and .=, but computer don't accept my work.


//Place your code below this comment

$firstName= 'Rasmus';
$lastName= 'Lerdorf';
$fullname= "$firstName $lastName";
$fullname= "$firstName $lastName was the original creator of PHP. /n";

echo $fullname;

2 Answers

Sam Wilson
Sam Wilson
2,619 Points


Your code is correct for the most part but not to the specification of the challenge, and it could be simplified a little bit, it should read:


//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = "$firstName $lastName";

echo "$fullname was the original creator of PHP\n";


Also your new line "\" was the wrong way around. (\n)

Hope this helps :)