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

Jacob Anderson
Jacob Anderson
7,888 Points

3/3 stuck on code challenge. for PHP basics

I am not sure what I am doing wrong anymore. I have watched the videos over and over again and have tried everything I think. This isn't even the code I finished off with I just can't figure it out. Can anyone explain what I need to do and how to understand what I am doing wrong. Thannks,

index.php
<?php

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

2 Answers

Ulrike Pechmann
Ulrike Pechmann
18,211 Points

Watch your syntax carefully. (\n and variable call $fullName)

<?php

//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = "$firstName $lastName";
echo $fullName . " was the original creator of PHP \n";
?>
Jacob Anderson
Jacob Anderson
7,888 Points

Yeah I took some time away from the code challenge to get a clear mindset I changed my code to, echo "$fullName was the original creator of PHP" . "/n"; and It's still not right. I believe I am suppose to use concatenation . because of some of the other answers I found on this challenge. Even when I do use interpolation I still somehow don't get it right. I asked one of the mods for a line of code just so I can see what I am doing wrong...