Posts tagged blog
Automatic year display
Jan 19th
<p>© <?php
$copyYear = 2008;
$curYear = date('Y');
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?></p>
which has the following result:
© 2008-2012
Jan 19th
<p>© <?php
$copyYear = 2008;
$curYear = date('Y');
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?></p>
which has the following result:
© 2008-2012