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 trialJohn Lukacs
26,806 PointsFor this code challenge, you'll need to check out the documentation for the date function to see details about formattin
Why does my code not pass it looks correct
<?php
echo 'Today is ';
//Place your code below this comment
echo date("F") .' ' . date('d') . ", ". date("Y");
?>
<?php
echo 'Today is ';
//Place your code below this comment
?>
5 Answers
Casey Ydenberg
15,622 PointsTry
echo date('F d, Y');
That should produce the same result, though.
Brandon Leung
17,734 PointsThanks for this! I was using the escape character before the comma. Problem solved!
sean shea
22,104 PointsThank you :P I was tying echo date('D d, Y'); and I couldnt figure out what was wrong lol
Filip Sevcik
2,279 Pointsecho "Today is ";
echo date("F d, Y");
Aaron Shufelt
3,154 PointsYou can get the same exact result by concatenating, either by variable assignment as I've done below or by just calling the date function itself. However for whatever reason, treehouse won't take this as a correct answer.
$today = date("F d, Y");
echo 'Today is ' . $today . "." ;
or
echo 'Today is ' . date("F d, Y") . ".";
John Lukacs
26,806 PointsJohn Lukacs
26,806 PointsYou glorious tit willer
Casey Ydenberg
15,622 PointsCasey Ydenberg
15,622 PointsThats an odd remark. Did the solution help you?