Call

Tag Archives: PHP

PHP Snippet: Dynamic copyright notice

0
Filed under Open Source

This how to use PHP to code a dynamic copyright notice:

<p>
<?php
$firstyear = "2009";
$currentyear = date("Y");
if ($currentyear==$firstyear)
  echo "copyright © ".$firstyear." company Limited, all rights reserved.";
else
  echo "copyright © ".$firstyear."-".$currentyear." company Limited, all rights reserved.";
?>
<p>