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

Task 4 Adding a contact form

What extacly, am i supposed to do here?

concatenation.php
<?php

$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:

<?php
$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.