$date0 = mktime("","","",date("m"),date("d"),date("Y"));
echo strftime("%W",$date0);
If I read the question correct you need the uppercase "W" not the lowercase... This is to get 1 week for a certain day.
I wrote this function the other day to display current week back to the first of the year and the date of every monday back...
You can modify it to fit your needs...
function listbox_week ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"formpulldown\">\n";
$weekx = '0';
for ($weekf=strftime("%U"); $weekf>=1; $weekf--) {
$weekx ++;
$str = '-'.$weekf.' week Monday';
if (($timestamp = strtotime($str)) === -1) {
$weekmsg = "The string ($str) is bogus";
} else {
$weekmsg = "Week ".$weekx." - ".date('F j',$timestamp);
$weekdate = date(m.'/'.d.'/'.y,$timestamp);
}
if ($default == $weekx) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".$weekdate."\" $selected>".$weekmsg."</option>\n";
}
$result.="</select>\n";
return $result;
}
// Then you can echo it back like this...
echo listbox_week("week", strftime("%U"));