PHP 以天为维度拆分为数组

     $todayStart = strtotime(date('Y-m-d 00:00:00', time())) - (40 * 86400); //默认查询查询一个月内的数据
        $todayEnd = strtotime(date('Y-m-d 23:59:59', time())); //默认查询结束时间
        $date_arr = range($todayStart, $todayEnd, 86400);

  

posted @ 2022-03-09 16:33  瑾琛  阅读(79)  评论(0)    收藏  举报