Dynamic Footer Copyright Year using php

So let’s say your current footer looks something like this…

<p id="footer">copyright © 2014 by Haneef Puttur, Inc</p>

To put that copyright year on auto-pilot, simply drop this bit of code in there and sit back and relax.

<p id="footer">copyright © <?php echo date('Y'); ?> by Haneef Puttur, Inc</p>

If your copyright is a range of years, like 2001-2014, just add the snippet after the dash of the first year like this…

<p id="footer">copyright © 2001-<?php echo date('Y'); ?> by Haneef Puttur, Inc</p>.