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 trialunnamed1056
5,037 PointsString Manipulation
What it's wrong with this code ? I get this error "You have not used the correct spacing in your string"
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . ' ' . $lastName;
echo $fullName . " was the original creator of PHP" . "\n";
?>
4 Answers
Robert Leonardi
17,151 PointsThere's nothing wrong with your code. The string's fine.
Rasmus Lerdorf was the original creator of PHP
Robert Leonardi
17,151 PointsYou can try debugging few ways
- try deconstructing your code one by one.. for example , only echo firstname, ... then only lastname, then... try echo both.. or combine with other string, etc.
- make sure you have no other code beside these lines..
good luck
Alena Holligan
Treehouse TeacherActually just missing the period, but I also change the challenge to give a better hint :)
unnamed1056
5,037 PointsFinally I was pass the challenge, thank u!
Robert Leonardi
17,151 Points@unnamed1056 , pls upvote my answer if you find them helpful
unnamed1056
5,037 Pointsunnamed1056
5,037 PointsBut why I get error ?