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 PHP on the Web Date Function

I think my answer is true

I've made preview and saw the return like the answer required but there is message said that "looks like you forgot echo command"

index.php
<?php
//Place your code below this comment
$today = date("F d, Y");
echo 'Today is '. $today ;

?>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Yes, your code produces the same result as what is expected. However, there was a comment in the original code that asks you to place your code below. This means that you may not alter the code above that comment, which is what has happened here. It expected the original echo statement to stay exactly as it was.

Instead, it wanted you to add an additional echo statement.

<?php
echo 'Today is ';
//Place your code below this comment
echo date("F d, Y");
?>

:bulb: Going forward through these challenges it's important to try not to alter anything that they haven't explicitly asked you to alter. If the challenge says to put your code below a certain line, leave everything above it as is. Even if functional outside the challenge, it can break the challenge as it is no longer getting the exact code it is looking for.

Hope this helps! :sparkles:

thanks for your help , it's working .