Thursday, 9 October 2014

Auto Update The Year In Footer Copyright Message

The year in the copyright message always displays the current year.

<?php
         $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
 ?>

0 comments:

Post a Comment