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

please help ! it showa bummer but the preview identical with the true answer !!

can you help me

index.php
<?php

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

?>
Benjamin Orimoloye
Benjamin Orimoloye
23,328 Points

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

your answer will print out the expected result, but it's not keeping your code simple.

3 Answers

Thomas Fildes
Thomas Fildes
22,687 Points

Hi Adnan,

Your code may be correct on the preview but the challenge will probably say bummer because there is a much easier way to write this without using concatenation. Here is the code I used to pass this challenge:

<?php
echo 'Today is ';
//Place your code below this comment
echo date("F d, Y");
?>

Hope this helps! Happy Coding!!!

YEAH !! THNX Thomas Fildes for ur time and ur answer it works :D :D now

thnx also Benjamin Orimoloye for your help :D happy coding everyone :D