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) What is PHP? PHP Basic Usage

William Laberge
William Laberge
1,394 Points

why it doesnt work?

<p><?php echo "Hello, World!" ?></p>

<title>PHP Basic Usage Challenge</title>
  <p><?php echo "Hello,world!" ?></p>


2 Answers

The challenge only wants you to echo the string Hello World not to have it in a p tag so you need to write this:

<?php echo "Hello World" ?>
William Laberge
William Laberge
1,394 Points

Thanks! I also notice the exercice didnt ask for the "!" And forgot my ";"

No problem, it will still work with out the semicolon but regardless its good practice to end every statement with a semicolon.

Colin Marshall
Colin Marshall
32,861 Points

Make sure you always type in exactly what the challenge asks for including capitalization and punctuation.

Yes, do exactly what the challenges ask for and nothing else. I agree with the semicolon being added. I always add one because it is too easy to fall into the habit of leaving one off where it is truly needed if I don't.