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 trialfernando anderson
4,781 PointsI don't understand why this isn't working; I've tried "<?php echo $name; ?>" but its telling me I'm doing something.
I've tried echoing with and without html and also inside the php tags but it telling me I'm doing it wrong. I can't think of anything I'm doing wrong can anyone help.
<?php $name = "Mike"; ?>
<!DOCTYPE html>
<html>
<body>
<?php
echo $name;
?>
</body>
</html>
2 Answers
Damien Watson
27,419 PointsHey Fernando,
They don't expect you to put the html elements in, so just the php part:
<?php $name = "Mike"; ?>
<?php echo $name ?>
fernando anderson
4,781 PointsThanks, I must have typed something in wrong; because I tried that one first. Thanks again for putting me on the right track and helping me understand the assignment.
Damien Watson
27,419 PointsYour welcome, glad you're back on track. I'm just jumping through this course now as well. :)