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
Vidit Shah6,037 Points
whats wrong in php code
$fullName=$firstName. $middleName. $lastName;
<?php $firstName = "Mike"; $middleName = "the"; $lastName="Frog"; $fullName=""; $fullName=$firstName. $middleName. $lastName; echo "The designer at Shirts 4 Mike shirts is named ____"; ?>
Shaun Dixon10,944 Points
The issue you have is that you have not assigned the variable $fullName the variables $firstName, $middleName and $lastName.
You need to use PHP concatenation to do this which can be achieved by:
<?php $firstName = "Mike"; $middleName = "the"; $lastName="Frog"; $fullName = $firstName . " " . $middleName . " " . $lastName;
The " " is what you would use between each variable to put a space between the names, so it would be equal to Mike the Frog.