• Get email updates

    or subscribe to my RSS feed

    Carson's Notebook

    Print Year with PHP

    The Problem:

    It’s that time of year again – the time to update the footer of your website with a new copyright year. It’s a simple enough task but can be extremely tedious when you have to do it across multiple websites – not to mention you are not getting paid to update all of your clients’ sites.

    The Solution:

    PHP. Rather than doing this small update every January, do it once now and forget about it. All you have to do is put the following code where you usually put your year in the footer.

    <?php print date("Y")?>

    or if you want the short form:

    <?=date("Y");?>

    This is the easiest way to streamline your development process and make website updates more efficient. Hope it helps you out.