Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP PHP Basics (Retired) PHP Data & Structure PHP Variables

Raphael Zwyer
Raphael Zwyer
924 Points

Task 2 of 2. I'm getting "Bummer! I am not seeing the word "Mike" in..." Using an editor it displays fine though.

I'm pretty sure this is correct. I tried to add head, meta, title... but I'm still getting the "Bummer! I am not seeing..." return. Using the same code in the workspace editor the name displays just fine. I'm not understanding what the error message tries to tell me. I also tried to strip the code to just pure <html> (no <body> tags), not working. If a positive return only comes with a very restricted code (no Doctype, no body or similar) this should be defined/emphasized.


$name = "Mike";


<!DOCTYPE html>
      <p><?php echo $name ?></p>

2 Answers

Your code is entirely correct but it's actually more than what is being asked for. It just wants you to turn around and echo out the name inside of the same PHP block without any HTML.

Raphael Zwyer
Raphael Zwyer
924 Points

Thanks, Corey, I figured it must be something like that. They really should point that out!