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 trialAdam Smith
4,611 PointsI am not able to add space between two php variables when combined into a third one.
Create a third string fullname. I'm stuck here. Googled for help. Did not manage to solve.
<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullname = $firstName " " $lastName;
?>
1 Answer
Alexander Davison
65,469 PointsYou need to have periods to concatenate (glue together) strings.
$fullname = $firstName . " " . $lastName;
I hope this helps. ~Alex
Adam Smith
4,611 PointsDid not help. That's what I got https://www.screencast.com/t/NuBRE7II
Adam Smith
4,611 PointsNever mind. I forgot the $ sign. Thanks.
Oliver Bird
57,653 PointsOliver Bird
57,653 PointsYou need to use the concatenation operator (the dot)
e.g.
$variableA . " " . $variableB;