Return to Snippet

Revision: 2835
at April 25, 2007 13:29 by 1man


Initial Code
<div id="footer">
	<p>&copy;
	<?php
	ini_set('date.timezone', 'Europe/London');
	$startYear = '2006';
	$thisYear = date('Y');
	if($startYear == $thisYear){
		echo $startYear;
	} else {
		echo $startYear.' &ndash '.$thisYear;
	}	
	?>
	Company Name Here</p>
</div>

Initial URL


Initial Description
Way to update the footer of a website automatically on 1st Jan.

Initial Title
Update Copyright Date in PHP

Initial Tags
update

Initial Language
PHP