Sunday, October 17, 2010

Stop your website copyright information going out of date

If you like your copyright information at the bottom of your website to update itself, do not hard code the date in to the page, use PHP to do it for you.

<?php>
echo '&copy;'.date('Y');
?>


That should be more than accurate, but you could always add in the month if you want as well:

<?php>
echo '&copy;'.date('F Y');
?>


Hope this helps...

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home