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 trialstefb
1,012 PointsIt looks like Task 2 is no longer passing. $fullName = $fullName . " was the original creator of PHP." . "\n";
Tried it several times in the workspace and got the result that is needed to show "Rasmus Lerdorf was the original creator of PHP." For some reason in the exercise itself an error message says "It looks like Task 2 is no longer passing." I also tried it with single quotes: $fullName = $fullName . ' was the original creator of PHP.' . "\n"; and using the secod operator: $fullName .= ' was the original creator of PHP.' . "\n"; all end in the same result, but are working well in my workspase .. Thank you in advance for any hint.
<?php
//Place your code below this comment
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = $firstName . " " . $lastName;
echo $fullName;
$fullName = $fullName . " was the original creator of PHP." . "\n";
echo $fullName;
// also tried:
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . ' ' . $lastName;
$fullName = $fullName . ' was the original creator of PHP.' . "\n";
echo $fullName;
// and this:
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . ' ' . $lastName;
$fullName .= ' was the original creator of PHP.';
$fullName = $fullName . "\n";
echo $fullName;
// and last:
$firstName = 'Rasmus';
$lastName = 'Lerdorf';
$fullName = $firstName . ' ' . $lastName;
$fullName = "$fullName was the original creator of PHP. \n";
echo $fullName;
// all end up in the same error message that Task 1 or 2 is no longer passing..
?>
2 Answers
Ryan Stewart
400 PointsI don't believe you need to output the $fullName variable here - which could be why it's failing for you.
Try just outputting like:
echo $fullName . " was the original creator of PHP.\n";
stefb
1,012 PointsHey Ryan, thank you so much! This was the right solution. Kind regards! Stef