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

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

Can you post your code?

This is the challenge: https://teamtreehouse.com/library/php-basics-2/php-on-the-web/date-function 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
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

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!