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

Escape character challenge.

my code <?php $firstName = "Rasmus"; $lastName = "Lerdorf"; $fullname = $firstName . " " . $lastName; echo " ' ". $fullname . " was the original one'\n"; ?>

index.php
<?php

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

3 Answers

Daniel Stopka
Daniel Stopka
13,520 Points

Hi, it is just a detail... You don't need to create ' characters at the beginning and at the end of the string...

Patrick Hurley
Patrick Hurley
5,233 Points
<?php

//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = $firstName . " " . $lastName;
echo $fullname . " was the original creator of PHP";
?>
Ines Repnik
Ines Repnik
5,460 Points

You are very close! Just look at the line with the $fullname, you need a . (dot) to assign these values to the variable. Like this: $fullname .= $firstName . " " . $lastName; and if you add the last part of the sentence to this, you have a solution!