Using the new datetime component (PHP >= 5.3.0) you can use a combination of DateTime, DateInterval and DatePeriod to get an iterator over all weeks in the given timespan.
$p = new DatePeriod(
new DateTime('2011-12-01'),
new DateInterval('P1W'),
new DateTime('2012-02-01')
);
foreach ($p as $w) {
var_dump($w->format('W'));
}
/*
string(2) "48"
string(2) "49"
string(2) "50"
string(2) "51"
string(2) "52"
string(2) "01"
string(2) "02"
string(2) "03"
string(2) "04"
*/