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 trialMonica Munteanu
11,971 PointsI keep getting two errors that Task 1 or Task 2 are no longer complete, however I have not changed the code.
no details. I do not understand the errors I am getting
<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = "$firstName $lastName";
$fullName = "$firstName was the original creator of PHP.\n";
echo $fullName;
?>
2 Answers
Patrik Horváth
11,110 Pointsgood but next time Combine strings by "."
$value = $newValue1 . $newValue2 . "STRING value";
it should be :
<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = $firstName. " " .$lastName;
echo $fullName;
?>
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsYou are giving the variable $fullName a new value by using the equal sign.
Instead of doing that second assignment of $fullName you should instead echo out the value of $fullName + "was the original creator of PHP.\n" - like this:
<?php
//Place your code below this comment
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = "$firstName $lastName";
echo "$fullName was the original creator of PHP.\n";
?>
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsHenrik Christensen
Python Web Development Techdegree Student 38,322 PointsIt's not required to use concatination if using double quotes.