I wrote a function a while back to get the first Sunday and last Saturday of a week for a given date, so if you take a look at it you may be able to modify it to work out the ranges a bit for what you want:
<?PHP
function get_week_range($day, $month, $year) {
$return = false;
// do some figurin'
$weekday = date('w', mktime(0,0,0,$month, $day, $year));
$sunday = $day - $weekday;
$start_week = date('Y-m-d H:i:s', mktime(0,0,0,$month, $sunday, $year));
$end_week = date('Y-m-d H:i:s', mktime(23,59,59,$month, $sunday+6, $year));
if (!empty($start_week) && !empty($end_week)) {
$return = array('first'=>$start_week, 'last'=>$end_week);
}
// otherwise there was an error :'(
return $return;
}
print_r(get_week_range('09', '07', '2008'));
?>
Would return this:
Array
(
[first] => 2008-07-06 00:00:00
[last] => 2008-07-12 23:59:59
)
Hope that helps.