Single Blog

Automatically update your website footer year

January 3, 2016, Written by 0 comment

To start the New Year off, we’re answering the question that often comes up in the first week of January – “How do I automatically update my the year in my website footer so I don’t have to manually change it?!”

It’s easy! Just use a simple bit of PHP instead of the date and it will automatically update on January 1st at 00:00.

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

Rather than wait a year for it to change, you can also test by adding the day of the week-

<php echo "Today is " . date("l Y");  ?>

l – Represents the day of the week

James Ensor