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 trialcarlos almanzar
1,935 Pointshelp with this
Anyone knows?
<?php
//Place your code below this comment
echo "Today is ". date('F d, Y');
?>
1 Answer
Corey Cramer
9,453 PointsKeep the original echo statement where it starts out and on a new line below where they say to start add:
echo date('F d, Y');
Your way is cleaner by far and serves the same purpose. This is one of those examples where you just have to play along.
vanamee
13,797 Pointsvanamee
13,797 PointsThe question asking for the day of the month to have a leading zero. For example, July 04, 2016.
If you want the day portion of the date to have a leading zero in front of it:
echo "Today is " . date('F d, Y');
If you want the day portion of the date to not have a leading zero in front of it:
echo "Today is " . date('F j, Y');
See this page for more information.