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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsWhy is This Wrong?
The Output is correct and i did the logic correct maybe I didn't do it in the way the computer Wanted I set the Variable to "Rasmus" Which is what it wanted but it said it was wrong my code isn't incorrect from what I can Tell.
<?php
$firstName = "Rasmus";
$lastName = " Lerdorf";
$fullName = ($firstName .= $lastName);
echo($fullName);
?>
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsHow do you post the image i don't see where i can
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,968 PointsImages are hard to work with. It is better to copy and paste your code and format it using markdown (see the cheatsheet at the bottom of this page)
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsOk figured it out
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsI figured out how to post the code not the question itself just to specify
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,968 PointsI stand corrected
3 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsI see three issues that would affect the challenge but would not be seen by looking only at $fullName:
- there is a stray space at the beginning of the string
" Lerdorf"
- the "
.=
" operator modifies $firstName, but the challenge is expecting it to remain as it was ("Rasmus") - you'll need to add a space between the combined names without changing the individual names
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsYeah You are Right I changed it to
$fullName = ("$firstName $lastName\n");
worked just fine that way
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsGood job! I don't think the newline ("\n") was part of the instructions but it was nice that it allowed it. But in general you'll get best results with the challenges if you do only what the instructions ask for. "Extras" can confuse the validation!
Happy coding!
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,968 PointsThe bummer message isn't very helpful. But one reason the challenge will fail is you have a space before Lerdorf in your lastName variable. Instead of a space there you can add one with concatenation to fullName as follows:
$fullName = $firstName . ' ' . $lastName;
![Maxwell Lees](https://secure.gravatar.com/avatar/c2e2702c685a2b1fc595cffc28ca58e7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Maxwell Lees
Courses Plus Student 1,001 PointsIn php whitespace doesn't matter so the space before that word is not the issue I am Having the issue is that it is saying that my variable $firstName is not equal to "Rasmus" which it clearly is.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsThe ".=
" alters $firstName, try echoing it out instead of (or along with) $lastName and see for yourself.
And whitespace might not matter in code, but it does matter inside strings.
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,968 PointsIgnore the error message about the firstName. That is why I said the bummer message isn't very helpful.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsThe fact that $firstName gets changed and is no longer equal to "Rasmus" is quite pertinent!
KRIS NIKOLAISEN
54,968 PointsKRIS NIKOLAISEN
54,968 PointsCan you post your code?