Auto Update Copyright Year

/ Published in: PHP
Save to your folder(s)

Very simple snippet to include if you want to auto update the year in a page copyright using PHP.

Copy this code and paste it in your HTML
  1. <ul>
  2. <li class="last">&copy; <?php
  3. ini_set('date.timezone', 'Europe/London');
  4. $thisYear = date('Y');
  5. echo $thisYear
  6. ?> Company Name Ltd. All rights reserved
  7. </li>
  8. </ul>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.