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 trialMatthew Frieswyk
4,362 PointsProblems getting date('Y') to echo
I am having trouble getting the date to echo into the html page.
<p>©<?php echo date('Y'); ?> Shirts 4 Mike</p>
returns
© Shirts 4 Mike
I'm not sure what I'm doing wrong.
Using MAMP to create a localhost
2 Answers
Matthew Frieswyk
4,362 PointsFor whatever reason my .php file was not saving propery. got it working.
Cosmin Cioaclă
21,339 PointsHi Brian,
Have you tried echoing a simple string to see if there's something wrong with your php set-up?
Cosmin
Matthew Frieswyk
4,362 PointsThanks for your help. I was able to pass a simple string into the title of the html
Cosmin Cioaclă
21,339 PointsCosmin Cioaclă
21,339 PointsGlad to hear that!