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 trialJames Johnson
1,670 PointsCode Challenge
Keep getting Bummers. I am being told Mike is not in the output. What's my mistake?
<?php
$name = "Mike";
echo $name;
?>
3 Answers
Kyle Jackson
5,113 PointsI think I see the problem. Your name is actually "James". ;)
Seriously, though - your code looks legit. I think perhaps it's a Treehouse grading bug?
James Johnson
1,670 PointsI refreshed the page after posting and entered the code as posted and it worked. Guess it was a bug of some sort in the grading. Thanks for the replies.
eduardomejia2
Courses Plus Student 22,237 PointsYou should include the challenge too, but I think that you should remove all the code after $name in the p tag. Because you already set the content of the variable to Mike.
I think the answer is:
<?php
$name ="Mike";
?>
<p><?php echo $name ?></p>
Rich Donnellan
Treehouse Moderator 27,696 PointsNope; works fine the way James did it.
Rich Donnellan
Treehouse Moderator 27,696 PointsRich Donnellan
Treehouse Moderator 27,696 Points^this. I passed using the same code as James.