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

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.