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 trialAlex Bauer
9,426 PointsWhy does it tell me that I forgot my echo command?
I can't change the code above the variable named $today, I also used an echo for that variable in order to include the date after the previously written string.
<?php
echo 'Today is ';
//Place your code below this comment
$today = date("F d, Y");
echo $today;
?>
2 Answers
Steven Parker
231,248 PointsWhile this solution would be functional, the challenge wants you to do it with a single line. Try it without creating the intermediate variable.
George Mashasha
11,206 Pointsskip the variable and echo the date function returned value :
echo date("F d, Y");
Alex Bauer
9,426 PointsOh okay thank you! I only tried it that way because the video I watched before showed the instructor creating a variable first. I should've read the instructions correctly. I appreciate your help a lot.
Alex Bauer
9,426 PointsAlex Bauer
9,426 PointsOh okay thank you! I only tried it that way because the video I watched before showed the instructor creating a variable first. I should've read the instructions correctly. I appreciate your help a lot.