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

I had the same output for the date

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

?>

outputs the same as what I should return October 24, 2017 ( at the current time of doing the exercise )

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

?>

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! While your output may be the same you've included unnecessary things in your arguments to the date function. I believe this challenge is explicitly checking what you're sending in to the date function. You've included a lot of concatenation which isn't necessary.

Take a look:

echo date('F d, Y');

This will produce the exact same output but is much more readable.

Hope this helps! :sparkles:

Matthew Lang
Matthew Lang
13,483 Points

You do not need to concatenate the strings within the date() function. Use this:

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

?>```

thanks I understand now, unnecessary concatenation