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

Is it not recognizing the date function?

I'm getting the "Bummer! You must use the built-in date function." error with the following code. Is date(); not the function it's talking about? <?php echo 'Today is '; //Place your code below this comment echo date ('F, m, Y'); ?>

index.php
<?php
echo 'Today is ';
//Place your code below this comment

echo  date ('F, m, Y');

?>

1 Answer

Hi Jarod,

These challenges can be picky sometimes on spacing.

There can't be a space after date and you need 1 space between echo and date. You have 2 spaces there.

Also, you used m in the format specifier which gives the month as a number. You need the day of the month which is d. And there should only be 1 comma in there.