/ Published in: PHP
![](/img/icon_sav.png?v3)
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/
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)