Auto Update The Year In Footer Copyright Message

I used to have to update these manually for my clients so did a bit of digging and found a few different tutorials that helped me slap this together. Now the year in the copyright message always displays the current year.

 		$time = time () ; 
 		//This line gets the current time off the server

 		$year= date("Y",$time); 
 		//This line formats it to display just the year

 		echo "Copyright &copy;" . $year . " YOUR-SITE-NAME | All Rights Reserved";
 		//this line prints out the copyright date range

Share this snippet


Comments (3) - Leave yours

  1. Christophor S. Wilson said:

    Or you could even just do:

    echo “Copyright © ” . date(‘Y’) . ” YOUR-SITE-NAME | All Rights Reserved”;

    That’s how I like to roll!

Leave a Reply

Your email address will not be published. Required fields are marked *

Please respect the following rules: No advertising, no spam, no keyword in name field. Thank you!