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 used the correct format

it says i didnt use the correct format to date("F j, Y") but on preview the output looks fine Task is to displaz time like this Example: Today is July 04, 2016

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

found it, it was d insted of j

1 Answer

Algirdas Lalys
Algirdas Lalys
9,389 Points

Hi Davor Rapic,

You are almost there, you just need to use d instead of j. The difference is that j will output 1, 2, 3, 4... and d will output 01, 02, 03, 04... and the tasks asks for specific format Today is July 04, 2016. I hope it helps:)

tnx, i didn't see the difference becouse it was greater then 09.