Update Copyright Date in PHP
Way to update the footer of a website automatically on 1st Jan.
Copy this code and paste it in your HTML
<div id="footer">
<p>©
<?php
ini_set('date.timezone', 'Europe/London'); $startYear = '2006';
if($startYear == $thisYear){
echo $startYear;
} else {
echo $startYear.' &ndash '.$thisYear;
}
?>
Company Name Here</p>
</div>
Report this snippet
Comments
Subscribe to comments