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

Jean Troiani
Jean Troiani
498 Points

Not sure why is not passing, I copy and paste the code on my workspace and looks like what I understood you are asking.

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

index.php
<?php

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

2 Answers

Lewis Combey
Lewis Combey
2,533 Points

Hi Jean, Your welcome I basically meant that your last line was not outputting the variable

Jean Troiani
Jean Troiani
498 Points

I added echo to test it, and didn't work either, I think it has to do with mutating the variable and breaking previous test, that's when you start missing constants. If that is the case, I think the test should be shown, so users can debug it properly.

Lewis Combey
Lewis Combey
2,533 Points

You want to add this to end line as you need to output: echo $fullname." was the original creator of PHP". "\n" ;

The previous task will not allow you to do your bottom line for the fullname and lastname as your adding to it before you need to

Jean Troiani
Jean Troiani
498 Points

Thank you Lewis, didn't understand clearly what was happening, but your answer was copied and pasted and worked.