PHP中计算一个时间段中有多少天:
$start = ‘2018-10-15’;
$end = ‘2018-11-26’;
time=strtotime(time= strtotime(time=strtotime(end) - strtotime($start);
$day = $time/(3600*24);
echo $day; //42
PHP中计算一个时间段中有多少天
最新推荐文章于 2023-12-29 16:53:34 发布
PHP中计算一个时间段中有多少天:
$start = ‘2018-10-15’;
$end = ‘2018-11-26’;
time=strtotime(time= strtotime(time=strtotime(end) - strtotime($start);
$day = $time/(3600*24);
echo $day; //42