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 trial

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,694 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,694 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,694 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.