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 trial

PHP

Problems getting date('Y') to echo

I am having trouble getting the date to echo into the html page.

<p>&copy;<?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

For whatever reason my .php file was not saving propery. got it working.

Cosmin Cioaclă
Cosmin Cioaclă
21,339 Points

Hi Brian,

Have you tried echoing a simple string to see if there's something wrong with your php set-up?

Cosmin

Thanks for your help. I was able to pass a simple string into the title of the html