PHP 获取当前星期一到星期天的日期
 <?php
$week = date('w');
$weeks['mon'] = date('m月d日',strtotime( '+'. 1-$week .' days' ));
$weeks['tue'] = date('m月d日',strtotime( '+'. 2-$week .' days' ));
$weeks['wed'] = date('m月d日',strtotime( '+'. 3-$week .' days' ));
$weeks['thu'] = date('m月d日',strtotime( '+'. 4-$week .' days' ));
$weeks['fri'] = date('m月d日',strtotime( '+'. 5-$week .' days' ));
$weeks['sat'] = date('m月d日',strtotime( '+'. 6-$week .' days' ));
$weeks['sun'] = date('m月d日',strtotime( '+'. 7-$week .' days' ));
var_dump($weeks);
?>
输出:
array(7) {
  ["mon"]=>
   string(10) "08月15日"
  ["tue"]=>
   string(10) "08月16日"
  ["wed"]=>
   string(10) "08月17日"
  ["thu"]=>
   string(10) "08月18日"
  ["fri"]=>
   string(10) "08月19日"
  ["sat"]=>
   string(10) "08月20日"
  ["sun"]=>
   string(10) "08月21日"
}