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 trialJeff Jones
3,928 PointsStuck on PHP Question
I am taking a quiz and I have no idea what to do. Here is the question:
1) Use the $fullName variable
2) Display the following string to the screen.
Rasmus Lerdorf was the original creator of PHP.
3) Use an escape character to add a newline to the end of the string.
Here is my code:
<?php
//Place your code below this comment
$firstName = "Rasmus"; $lastName = "Lerdorf"; $fullName = $firstName . " " . $lastName "was the orignal creator of PHP";
?>
Would you mind helping me? Answers in code are best.
Thanks!
<?php
//Place your code below this comment
?>
KRIS NIKOLAISEN
54,971 PointsWhat does jdd mean?
3 Answers
Frederik Hulleman
PHP Development Techdegree Graduate 15,232 PointsAnd don't forget item 3) of the question! ;)
Frederik Hulleman
PHP Development Techdegree Graduate 15,232 PointsI think it's much more useful to give you a hint, rather than giving you the code if you don't mind.
3 things I noticed: 1) they ask to display text. what could you use to display the $fullName variable? 2) in your code, to display the sentence, I miss a concatenator 3) you're combining two things in one line of code: creating the fullName variable and displaying the full sentence
I hope this is helpful. If not, let me know!
Cheers!
Jeff Jones
3,928 PointsOk, I got to here:
<?php
//Place your code below this comment $firstName = "Rasmus"; $lastName = "Lerdorf"; $fullName = $firstName . " " . $lastName . " " was the original creator of PHP./n";
?>
Unfortunately, I have a disability and it makes it really hard for me to get through this stuff. I don't know what's not working in the code. I'm wondering if I'm setting up the /n wrong or if it's something else in the way I wrote it.
Anyways, thanks for your help! :)
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 PointsTonnie Fanadez
UX Design Techdegree Graduate 22,796 Pointsjdd