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

Site bug(Bummer)

This is my code below:

Bummer: Looks like you forgot the echo command

$date = date('F d, Y');
echo "Today is $date";

1 Answer

Niki Molnar
Niki Molnar
25,575 Points

Hi Robert

Your PHP is correct - this is just a quirk of the question and how they wanted the answer to be. It asked for a "single date function". What you did was put it into a variable then call the variable.

echo 'Today is ';
//Place your code below this comment
echo date('F d, Y');

It will then echo out 'Today is July 17, 2018' as there is no line break between the 2 echos, so it will just continue. All you needed, therefore, was to echo the date.

Good luck!