Welcome to the Treehouse Community
Looking to learn something new?
I am trying to concatenate the first 3 variables into one WITH spaces. The test tells me I'm almost there, but am missing the spaces and can't seem to figure out how to add them. What gives?
Thanks for any help!
<?php $firstName = "Mike"; $middleName = "the"; $lastName = "Frog"; $fullName = $firstName . $middleName . $lastName; echo "The designer at Shirts 4 Mike shirts is named ____"; ?>
Randy HoytTreehouse Guest Teacher
As you know, you can concatenate variables together like this:
echo $variable1 . $variable2;
You can also concatenate pieces of text together like this:
echo "ABC" . "DEF";
A space is just another piece of text, albeit a short one, that you could concatenate like this:
echo "ABC" . " " . "DEF";
You can concatenate pieces of text together with variables like this:
echo $variable1 . "ABC" . $variable2 . "DEF";
Does that help?
Fantastic! Bone-head move on my part.. was using the space at the end :)
Thanks for the quick reply, goes a long away for my sanity!