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

PHP PHP Basics Daily Exercise Program String Manipulation

dale das
dale das
1,262 Points

Lerdorf vs Lerdof? - In this quiz theirs a typo of the spelling of the last name with in the instructions and prompt

in this this challenge the instructions under the Challenge Tally say the last name is Lerdorf but prompt says it should say Lerdof? I've rechecked my work and I'm trying both the . and the + and + " " + to add the same and nothing works :(

index.php
<?php

//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = "$firstname + $lastname";


echo $fullname; 
?>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Yes, there does seem to be a typo in the Bummer! message. However, the primary reason your code is not passing right now is that you've misspelled both of your variable names. Keep in mind that just about everything in programming is case-sensitive. You've typed $firstname and $lastname, but you meant to type $firstName and $lastName.

Hope this helps! :sparkles:

edited for additional information

Also, the + sign is not needed. This may be safely removed. If you were to fix the variable names and echo out the result, "Rasmus + Lerdorf" would be echoed out to the screen instead of "Rasmus Lerdorf".

dale das
dale das
1,262 Points

Thank you I removed the plus sign and it worked!