最终打印代码:
print_r($_POST);
echo(date(‘Y-‘ . $_POST[‘start_time’] . ‘-01 00:00:00’));
echo(date(‘Y-m-t 23:59:59’, strtotime(date(‘Y-‘ . $_POST[‘end_time’] . ”))));
echo exit();
打印结果:
Array ( [CustomerRebate] => Array ( [money] => 1000 [sale_uid] => 31 ) [start_time] => 1 [end_time] => 10 [yt0] => 确认 ) 2014-1-01 00:00:002014-10-31 23:59:59
完善支持读取某月第一天及最后一天的时间,也就是某个时间范围了!
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/250339.html