/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Current year only With start year Start date with error protection <?php function auto_copyright($year = 'auto'){ ?> <?php } ?> Usage: <?php auto_copyright(); // 2011?> <?php auto_copyright('2010'); // 2010 - 2011 ?>
URL: http://css-tricks.com/snippets/php/automatic-copyright-year/