Determining Whether a Given Year Is a Leap Year
<?php function is_leap_year($year) { $ts = strtotime("$year-01-01-"); return date('L', $ts); } for($i = 2000; $i <= 2010; $i++) { $output = "$i is "; if( !is_leap_year($i) ) $output .= "not "; $output .= "a leap year.<br />\n"; echo $output; } ?>