//某天
$date = '2024-11-11';
//本月第一天
$beginDate = date('Y-m-01', strtotime($date));

//本月最后一天
$endDate = date('Y-m-d', strtotime("$beginDate +1 month -1 day"));
$endDate = date('Y-m-t', strtotime($date));

$begintime = strtotime($beginDate);
$endtime   = strtotime($endDate);

//输出每一天
for ($start = $begintime; $start <= $endtime; $start += 24 * 3600)
{
echo date('Y-m-d',$start).'<br>';
}

作者 admin

百度广告效果展示