Picnic Website Code Tutorials

Automatic Update Copyright Date With PHP Tutorial

This PHP code will automatically update to the new year without you having to lift a finger. You can also do this with Javascript, but as you most likely already know, using PHP is better. It can't be turned off! Any page using the code snippet below, must end in a PHP extension, and of course, your host must support PHP (BLA - BLA - BLA). Also, you can wrap it all in an anchor if you want to make it a link. Enjoy!

The Code

Copyright &copy; 2007 - <?php $year = date("Y"); echo $year; ?> WebsiteCodeTutorials.com
		

The Result

Copyright © 2007 - 2024 WebsiteCodeTutorials.com 
		

Sponsors

Top Donators

Friends of Mine