By using PHP, it’s quite simple to write less than one line of code in your footer and then never have to worry about updating that footer date ever again.

What we’ll do is fetch a timestamp of the current date and time from the server using the PHP “date” function. We can then parse this timestamp using the same function allowing us to print only the full year.

Here’s the code:

<?php echo date("Y"); ?>

Yup, that’s it. If you wanted to show more than just the year you might what to check the PHP documentation for the date function. There are a whole boatload of possible ways to format a date for display.

Your final footer might look something like this:

<p id="footer">
 &copy; <?php echo date("Y"); ?> Blaze New Media.

Stick with something like that and you’ll never be outdated again.