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 PHP Basics (Retired) PHP Data & Structure PHP Variables

Task 2 in Stage 2 is not working.

I created the variable $name, but when I echo the request it doesn't work I also tried adding the html part, but still doesn't work..

Please help!


$name = "Mike";


<p><?php echo $name ?></p>

4 Answers

Hi Maria,

The challenge is expecting you to put both php statements in the same php block.

You don't want to add extra html not requested in case this throws off the output and you should end each php statement with a semicolon.

echo $name didn't have a semicolon at the end.

17,917 Points


; missing after $name

I added it, but still won't read it. Do I need the <p> tags at all? although I removed them and nothing happens...

Thanks Jason, I was adding an extra php block that was the problem.. :)