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

MELVIN GEORGE
MELVIN GEORGE
3,490 Points

Problem With PHP ?

What's Wrong with this code...?

Its keep saying "try again"..!

index.php
<?php

$name ="Mike";

?>
<!doctype html>
<body>
  <section>
    <h1><?php echo "Mike" ?></h1>    
  </section>

</body>

2 Answers

Samuel Glister
Samuel Glister
12,471 Points

Hi Melvin,

The only issue i can see here is you need to add a space between = "Mike"

Hope this helps

Samuel Glister
Samuel Glister
12,471 Points

Also you may want to echo out the variable name i.e so its

<?php echo $name ?>

Sorry missed this initially

MELVIN GEORGE
MELVIN GEORGE
3,490 Points

Thanks sir ..It helped me this code challenge issue..!