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!

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 Build a Simple PHP Application Adding a Contact Form Concatentation

Task 4 Adding a contact form

What extacly, am i supposed to do here?


$firstName = "Mike";
$middleName = "the";
$lastName = "Frog";
$fullName = $firstName . " " . $middleName. " " . $lastName;

echo "The designer at Shirts 4 Mike shirts is named $fullName" ;


1 Answer

Peter Kullmann
Peter Kullmann
14,267 Points

Insert the code you stated above and you will see that your echo statement lacks an exclamation mark at the very end of the message. Add it and you're done.

For future echo statements, I would recommend you another style of using variables in echo strings:

$text = World;
echo 'Hello' . $text . '!';

This dot notation makes intermingling of text and variables more obvious and - don't quote me on that as I cannot remember the source - will make the echo statement execute faster.