Welcome to the Treehouse Community
Looking to learn something new?
Bart Poelstra2,385 Points
I'm trying to echo mike's name in the output. So I thought: <?php echo $name ?> But that seems incorrect.
Hope someone can help! :)
<?php $name = "Mike"; ?> <?php echo $name ?>
I just took the challenge and passed with this code:
<?php $name = "Mike"; echo $name;
I see a couple of things that might be preventing passing the challenge. Most importantly, you are missing the ; after your echo statement. Second, you do not not need to close and open your php between the variable and echo.
You may notice that I did not close my php. You do not have to close if all the code on the page is php.
Jeff Lemay14,266 Points
This challenge comes up frequently. They want all your code in a single php block (like Ted's answer, although I always close my php no matter what just to be safe).
Your code is "correct", just not what the challenge wants.