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 trialMarwan Bakr
7,579 PointsWhat's wrong here?
When I click Preview, it outputs exactly what the instructions say it's supposed to output, but when I check work it says I forgot the echo command.
<?php
//Place your code below this comment
$today = "Today is " . date('F d, Y');
echo "$today";
?>
1 Answer
Daniel Stopka
13,520 PointsHi,
I assume, that it wants cleaner code. To be more precise, if you are echoing a single variable, it is not necessary to be inside double quotes although the variables inside double quotes are expanded... so try:
echo $today;
Marwan Bakr
7,579 PointsMarwan Bakr
7,579 PointsIt still says that I forgot the echo command.
Daniel Stopka
13,520 PointsDaniel Stopka
13,520 Pointsahh yeah, I reviewed it, and we need to do exactly what is asked in instructions... do not delete the first line and write code to display the rest... So at first line you have "Today is " that continue and echo just the date and you should be fine...