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

James Johnson
James Johnson
1,670 Points

Code Challenge

Keep getting Bummers. I am being told Mike is not in the output. What's my mistake?

index.php
<?php

$name = "Mike";
echo $name;

?>

3 Answers

Kyle Jackson
Kyle Jackson
5,113 Points

I 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
James Johnson
1,670 Points

I 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.

You 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>