Reputation: 35
Create a variable called fullName and assign it a value equal to the concatenation of the firstName variable, a space, the middleName variable, a space, and the lastName variable.
I have :
$firstName = "Tony";
$middleName = "Muscles";
$lastName = "Montana";
Why doesn't the following work?
$fullName = $firstName." ".$middleName." ".$lastName
Upvotes: 0
Views: 1081
Reputation: 2229
Missing the semicolon:
$fullName = $firstName.' '.$middleName.' '.$lastName;
Upvotes: 3