Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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! :)