tbg5kg
Last Updated: February 25, 2016
·
247
· mikeballan

Dynamic footer year

php

Had to make some updates to a website the other day that was made before we built sites using PHP includes which means i had to change at least 20 pages all becaude the footers date was wrong..!

Now these days when i’m building a website that needs a date in the footer i use a simple bit of PHP code which means you will never need to update it.

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

And that is all the code you need to print the current year.