PHP PHP Basics PHP on the Web Date Function

Code error

When I click check work on this challenge an error message comes up, but when I went on the preview section, it displayed as it was supposed to. Is it me who is making the mistake or treehouse? Thanks

This is the challenge: And this is My code: <?php echo 'Today is '; //Place your code below this comment echo date('F d\, Y'); ?> Sorry I thought it would be put on automatically.

2 Answers

Jennifer Nordell
Jennifer Nordell
Treehouse Staff

Hi there, yc5 ! I received your request for assistance. Your code would ultimately produce the same result, but you have an unnecessary escape character \ in the string passed into the date function. This challenge is specifically testing the string passed in and it doesn't exactly match because of that. Removing the backslash should cause this to pass.

Hope this helps! :sparkles:

Thanks It worked!