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 trialYu-Che Hung
Courses Plus Student 10,607 Pointswhy it keeps telling me that I forgot the echo command?
why it keeps telling me that I forgot the echo command? I already typed it
<?php
echo "Today is ";
//Place your code below this comment
$today= date("M d,Y");
echo "Today is $today ";
?>
2 Answers
Brett Marion
6,915 PointsHello Yen,
Try the following code.
<?php
echo 'Today is ';
//Place your code below this comment
echo date("F d, Y");
?>
Rune Andreas Nielsen
5,354 PointsHi, Yen.
I don't have a subscription to TreeHouse, but from what I can see (without testing)
Your code should look like this:
<?php
echo "Today is ";
//Place your code below this comment
$today= date("F j, Y");
echo "$today ";
?>
So the final output matches the required challenge output: "Today is July 04, 2016"
The issue with your implementation of the challenge is that you echo "Today is" two times and the date does not match the format that is requested.
Have fun programming. :)