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

Normunds Karklis Upenieks
Normunds Karklis Upenieks
4,275 Points

Challenge task 3 of 3 is not working properly....

Hello,

Im not shure why this task is not accepting my code:

<?php

//Place your code below this comment $firstName = 'Rasmus'; $lastName = 'Lerdorf'; $fullName = "$firstName $lastName"; $fullName .= ' was the original creator of PHP' . "\n";

echo $fullName; ?>

I have tried different methodes to type it. it just throws me back to task Two...

index.php
<?php

//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = "$firstName $lastName";
$fullName .= ' was the original creator of PHP' . "\n";

echo $fullName;
?>

1 Answer

Simon Fukada
Simon Fukada
7,767 Points

Hi there, I got this task completed in a slightly different way... My code for this part was: echo "$fullName was the original creator of PHP. \n";

Although I tried what you did and it seemed to output correctly, you just forgot the period right after the PHP inside the string, but even when I did that it didn't pass this step. My only guess would be maybe because the challenge is looking for something really specific? but I'm not totally sure.

Hope this helped! :)