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

PHP basics date_function

Print today's date to screen? Formatted by month day comma year?

index.php
<?php
echo 'Today is '.date('M d, Y');
//Place your code below this comment
echo 'Today is '.date('M d, Y');


?>

1 Answer

Joel Bardsley
Joel Bardsley
31,249 Points

You're close Chris, but if you double check the date documentation 'M' outputs a "short textual representation of a month" (the first three letters) rather than the full name of the month shown in the challenge.

Once you've corrected that, make sure to remove the date function from Line 2 and just echo out the date function on Line 4 to avoid potential errors.

Cheers Joel,

I spotted it just after I posted this but thanks for the quick response.