In preparation for the new year, this is a simple but useful PHP snippet for keeping your copyright notice up to date on your blog or Web site.
<?php echo 'Copyright © 2006 – ' . date("Y"); ?>
That will output Copyright © 2006 – 2007, with the “2007″ dynamically updating to the current year.
The HTML entity – just means a dash. You could also do just:
Copyright © <?php echo date("Y"); ?>
…which would output Copyright © 2007 (with the date always being the current year).
It works on WordPress blogs also — just insert the code snippet in footer.php.
Related posts:
- How to Turn Proxy Hijacking Into Inbound Links to Your Web Site How to turn a dangerous proxy duplication into a beneficial...
- How to Add Google Analytics To vBulletin (including archives) Most tutorials on how to add Google Analytics to vBulletin...
- Getting More EDU Backlinks This is a shell script that will help you find...
- Introduction to Advanced SEO Site Analysis for Large Web Sites A few tips on how to start an SEO analysis...
- Are Your WordPress Plugins Secretly Injecting Links in Your Blog? I don't mind giving a free link to a WordPress...


3 Comments
I recommend that a date-last-modified bit be added for those of us pour souls who do web research a lot. Just remember to put this code on the actual content page, not include files that exist on every page, etc.
Comment field swallowed my code… here ya go with slight mods:
Resources for all the colleges – higher education and employment in Canada and in the world. Info about undergraduate, career resources, jobs by location, information for students.