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.

PHP

Lucas Jones
Lucas Jones
1,370 Points

I'm getting the required results yet it won't let me move on.

Use the $fullname variable to display the following string to the screen. Use an escape character to add a newline to the end of the string.

'Rasmus Lerdorf was the original creator of PHP'

//My code <?php

//Place your code below this comment $firstName = 'Rasmus'; $lastName = 'Lerdorf'; $fullname = $firstName . " " . $lastName; $fullname .= ' ' . 'was the original creator of php'. "\n"; echo $fullname; ?> // my results Rasmus Lerdorf was the original creator of php

Simon Coates
Simon Coates
28,692 Points

Treehouse should let you attach your forum post onto a challenge. If you don't have any luck with this, you can include a URL to the challenge, so people can verify that the advice they're giving you is solid. Additionally, treehouse forum posts allow use of something called 'markdown'. If you put three backticks (probably on the key with the tilde) on the line before code and three backticks on the line after code, you should be able to get your code in a more readable format. You can optionally include the code language on the first backticks line to get CSS styling for your language of choice.

1 Answer

Simon Coates
Simon Coates
28,692 Points

I changed the message slightly. Apart from this, you're not meant to change the value for $fullname, since it tests that this contains the correct value (sometimes the verification code just looks for specific text and sometimes it runs the thing and checks what's in your variables or output). so:

<?php
//Place your code below this comment 
$firstName = 'Rasmus'; 
$lastName = 'Lerdorf';
$fullname = $firstName . " " . $lastName; 

echo $fullname .' ' . 'was the original creator of PHP'. "\n"; 
?>
Lucas Jones
Lucas Jones
1,370 Points

Thanks I need to do a better job of reading what the question is asking.

Simon Coates
Simon Coates
28,692 Points

if they give you a quote, it usually makes sense to try and copy and paste, so you don't have to worry about case, correct punctuation etc. The other day, i had a guy who couldn't work out why his code was failing and it was because the message that treehouse wanted contained a spelling mistake.