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 trialMaria Gil
1,765 PointsTask 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!
<?php
$name = "Mike";
?>
<p><?php echo $name ?></p>
4 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi 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.
jrabello
17,917 PointsHello,
; missing after $name
Maria Gil
1,765 PointsI added it, but still won't read it. Do I need the <p> tags at all? although I removed them and nothing happens...
Maria Gil
1,765 PointsThanks Jason, I was adding an extra php block that was the problem.. :)