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

jennifercooley
jennifercooley
16,813 Points

This Challenge will not work. why? <?php $name = "Mike"; echo $name; ?>

I double checked the forum and this is what it is supposed to be so why do I not get the points? Please help!

6 Answers

jennifercooley
jennifercooley
16,813 Points

I took the semi colon out after the echo and it was correct.

I can't seem to get part 2 of this challenge. What am I missing?

Here is my answer: <?php $name = "Mike" ?>

<h1><?php echo $name ?></h1>

It keeps telling me this is incorrect, but it's the same answer as in the video. I get this response: Bummer! I am not seeing the word "Mike" in the output. Did you echo something different?

Thank you so much! :-)

Brenden Konnagan
Brenden Konnagan
16,858 Points

I feel like this is a bug... It is interesting that there is no requirement to include or not include the concluding semi-colon on the echo statement.

You can reference PHP Manual for clarity. Check it out here.

Perhaps it is something that Randy Hoyt will be kind enough to look at?

It's funny you say that, because I had thought that initially. I think I had just taken the example in the lesson too literally and should have done some reading on standards. Thank you for the link to the PHP Manual. Really appreciate it! Great community of students helping each other out. Cheers ;-)

Omer Asadullah
Omer Asadullah
10,415 Points

I have the same problem. Semi colon or no semi colon no difference. The error keeps on persisting.