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

Alex Bauer
Alex Bauer
9,426 Points

Why does it tell me that I'm not displaying the correct string?

The step specifically asks me to display the string with an \n at the end of the code. I tried concatinating the strings and I get an error. I've tried multiple ways but none of which work.

index.php
<?php

//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . ' ' . $lastName;
echo $fullName . ' ' . 'was the origin creator of PHP.' . "\n";
?>
Alex Bauer
Alex Bauer
9,426 Points

It says I can't change the $lastname variable, and it needs a space between the string and the full name.

1 Answer

Steven Parker
Steven Parker
231,269 Points

The instructions asked you to display "Rasmus Lerdorf was the original creator of PHP."

But it looks like you have "origin" instead of "origin‍al".

Alex Bauer
Alex Bauer
9,426 Points

I just tried it and it worked lol