Quantcast
Viewing latest article 4
Browse Latest Browse All 5

Adding a dynamic footer date with PHP

This is the PHP code to use to add an automatically updating copyright date for a blog, website, or whatever that allows PHP code.

The code:
<p>&copy;<?php echo date("Y"); ?> All rights reserved</p>

Which produces this:

©2017 All rights reserved



OR... one may wish to keep the originating date in there, too, e.g.:
<p>&copy; 2010-<?php echo date("Y")?> All rights reserved</p>

Which will give us:

© 2010-2017 All rights reserved


Viewing latest article 4
Browse Latest Browse All 5

Trending Articles