Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!