Nothing screams “THIS WEBSITE HASN’T BEEN UPDATED IN A WHILE” like an out-of-date copyright notice in your footer.

Several years ago, I decided to code a little smarter, and on every website that I’m responsible for, I insert a PHP snippet that displays the current year.  So now I never have to go back at the beginning of each year and update my copyright notices!

Here’s the code below. Something like….

[php]
<div>
Copyright 2005 – <?=date(‘Y’); ?> | All rights reserved.
</div>
[/php]

Now this assumes you’ve got PHP short tags turned on.  If not, you’d do this…

[php]
<div>
Copyright 2005 – <?php echo date(‘Y’); ?> | All rights reserved.
</div>
[/php]

Notice the “echo” instead of the equal sign.

This also assumes your pages are .php and not .html.  If you still name your files .html, then I would strongly urge you to start naming everything .php and then stripping the extension via your .htaccess file…. but that’s for another blog post.

So that’s it!  Save yourself some hassle every year so you don’t have to go back and update your copyright dates and include this PHP snippet in your footer.

Remember, even though you may not update your site very often, it doesn’t have to have a dead give-away in the footer that you haven’t updated it!