Hi
I have to create a list of weeks from Saturday to Saturday in the year.
eg 1 May - 8 May 8 May - 15 May etc
These dates are all Saturdays..
Is there a way of getting PHP to do this automatically with the Date() function??
cheers
Lindsay
$start = strtotime('2005-01-01'); $end = strtotime('2005-12-31'); while ($start <= $end) { if (date('l', $start) == 'Saturday') { $week_start = date('l Y-m-d', $start); $week_end = date('l Y-m-d', $start + 604800); echo $week_start . ' -> ' . $week_end . '<br>'; } $start += 86400; }