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

hi friends wish you best could you help me to pass this part i can't make the result that instructor asked

i can't pass third part

index.php
<?php

$firstName = "Rasmus";
$lastName = "Lerdorf";

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

?>

1 Answer

Sean Pierce Sumler
Sean Pierce Sumler
18,968 Points

Hello! First, your variable should exist outside of the quotation marks, or else it will be perceived as part of the string. Second, your line break should come at the end of your expression. Here is the code that worked for me:

 <?php

 $firstName = "Rasmus";
 $lastName = "Lerdorf";

 $fullname = $firstName . " " . $lastName;

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

 ?>

thanks friend if it's possible i want to be in contact with you on social media . is it possible?