Automatically Update Copyright Year on a Website (For Dummies)1 / 19 / 2010
It may seem like a trivial thing to some, but many web designers, novices, and bloggers don't know how to have the copyright year automatically update on their website.
It's true that the year should really only be updated when the content has been updated, but for small business that don't get around to updating their content much. An ancient copyright year can look bad to prospective customers.
To show the current year, just use the following PHP code snippet.
<?php echo date("Y"); ?>
The full thing (assuming the current year is 2010)
<p>© 2001-<?php echo date("Y"); ?> Company Name</p>
© 2001-2010 Company Name
For more information see the PHP documentation about the date function.