Dynamic startyear / copyright for footer


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

echo's:
2008 / 10 - Company name


Copy this code and paste it in your HTML
  1. &copy; <?php ini_set('date.timezone', 'Europe/Amsterdam');
  2. $startYear = 2008;
  3. $thisYear = date('y');
  4. if ($startYear == $thisYear)
  5. {
  6. echo $startYear;
  7. }
  8. else
  9. {
  10. echo "{$startYear} / {$thisYear}";
  11. }
  12. ?> - Company name

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.