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

João Panão
João Panão
2,951 Points

I don't know If I'm doing anything wrong or the website is bugging me saying it's wrong....

I've seen the example on workspaces and it's correct... Am I doing something wrong?

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

2 Answers

This challenge can be passed. Restart the challenge and try echoing the call to the date function instead of using string concatenation.

Let me know if this helps here

João Panão
João Panão
2,951 Points

it doesn't... I think it's really the website.

This is how I wrote:

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

Generally, when you call a func, you don't include any whitespace. Example:

writeMsg(whatever)

Let me know if this helps here

João Panão
João Panão
2,951 Points

It worked now. Thanks.

Guess I'm having too much problems in php :/

This runs fine on PHPfiddle http://phpfiddle.org/# might be that the site is bugging out? Maybe it's trying to check for the leading 0 but there isn't one because it's later than the 9th of the month? Not sure.