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 trialChris George
10,740 Pointswhy is this not working?
The problem is saying to echo Mike's name to the screen. I am not sure why this is not working.
<?php
$name = "Mike";
?>
<!DOCTYPE HTML>
<html>
<body>
<p><?php echo $name ?></p>
</body>
</html>
3 Answers
Jeff Lemay
14,268 PointsYou did too much here. They just want you to create the variable and then echo it, you don't need to create a DOCTYPE or add head/body tags.
<?php
$name = "Mike";
echo $name;
?>
NOTE: everything must be in a single php-block in order to pass this challenge.
Brandon Bolin
760 PointsI think you are missing the semi colon after your $name echo.
Chris George
10,740 PointsI tried that too and it still says that it is wrong
Chris George
10,740 PointsChris George
10,740 PointsAwesome, thank you!