Automatically update copyright year

Posted By: Ian on Mar 09, 2011 in PHP, Snippets
Last modified on December 9th, 2012 at 7:52 pm,
<?php echo date('Y'); ?>

This simple PHP function will Automatically update your web pages with the current year which means you don’t have to waste time each year doing it manually and can get on with more important things! The only thing to remember is it takes the current year from the server where your site is hosted on so if the date is wrong or updates a little early or late it could be your server is in another time zone to the one you live in or the server has actually got the wrong date set! This is how my Copyright notice at the bottom of this page looks like behind the scenes


Did this help you? Please Let me know by commenting below even if it’s just to say “Thanks”

leave a comment

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,

protected by copyscape duplicate content check


Powered by Banner Bar 125