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 trialZack Ball
4,958 PointsConfused
I've tried to solve this several ways each way I've tried correctly printed out the date but it keeps saying I've forgotten the echo command.
<?php
//Place your code below this comment
$today = date('F d\, Y');
echo 'Today is '. $today;
?>
3 Answers
Mike Costa
Courses Plus Student 26,362 PointsYour formatting is correct, but have you tried just echoing the date (no variables involved) after the comment?
Zack Ball
4,958 PointsFigured it out on my own, escape character in my date function was was the issue.
Mike Costa
Courses Plus Student 26,362 PointsOne of the best things I love about programming is knowing there are multiple solutions to a problem. Some are more efficient than others and I always try to find the most efficient way even after I have solved the issue at hand. Don't be discouraged if your solution doesn't work, even if its one of the correct solutions. Just try to think outside the box to see if you can find a different way to solve it.
Zack Ball
4,958 PointsZack Ball
4,958 PointsWell I tried
<?php echo 'Today is '; //Place your code below this comment echo date('F d\, Y'); ?>
and it gives me "Bummer! You have not passed the correct string for formatting"
Honestly the challenges are the least intuitive process of Treehouse :| everything else is super enjoyable but this keeps happening with these challenges, despite having several ways I could reach the end result it only wants one way and I end up wasting a ton of time trying to get help on the forums each time :|