Search
  • Dynamic footer year

    Date: Sep 17, 2011  |  Categories: Php  |  Written By: Jeff Wright  

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.

Tags: 


Leave a Reply

Back to Top