Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
I cannot figure out what I am doing / why i am getting no output
unsure what i am doing wrong here to not be getting an output
<?php //Place your code below this comment $firstName = 'Rasmus'; $lastName = 'Lerdorf'; $fullName = "$firstName $lastName"; $string_one = ' was the original creator of PHP'; $string_one = ' $fullName' . $string_one; ?>
Jennifer NordellTreehouse Teacher
Hi there, jonny black! Remember that double quotes are used when you need the value of a variable as a part of the string. If you had tried to display the value of
$string_one to the console right now, it would display:
$fullName was the original creator or PHP
Literally, it would look just like that without a new line character, period, but most importantly, instead of "Rasmus Lerdorf" in place of
$fullName it would say the variable name "$fullName" which isn't what we're after.
First, you will need double quotes so that it gives the value stored in
$fullName instead of the string "$fullName". Secondly, you need to echo the string to display it. Finally, the string should end with a period/full stop and a new line character.
This is the line you're looking for:
echo "$fullName was the original creator of PHP.\n";
Hope this helps!