$j = 7;
$start_time = time();
$dateWeek = [];
$words = ['日', '一', '二', '三', '四', '五', '六'];
// 今天的日期
$toDay = date('m-d');
// 明天
$tomorrow = date("m-d",strtotime("+1 day"));
for($i = 0; $i < $j; $i++)
{
$t = $start_time + $i * 86400;
$nowDate = date('m-d', $t);
$dateWeek[$i]['date'] = $nowDate;
if ($nowDate == $toDay)
{
$week = '今天';
} else if( $nowDate == $tomorrow)
{
$week = '明天';
} else {
$week = '周'.$words[date('w', $t)];
}
$dateWeek[$i]['week'] = $week;
}
注重细节——关注底层——注重细节——关注底层——注重细节——关注底层——注重细节——关注底层——注重细节——关注底层