我有一个一周的数组,带有这样的时间戳2013-01-07 06:55:34
,我想做的是每天将数组拆分为 7 个不同的数组。这在PHP中可能吗?
我如何创建数组是这样的
$sqlCount="SELECT time_stamp FROM `download_log` WHERE WEEK(`time_stamp`) = WEEK(CURRENT_TIMESTAMP) AND YEAR(`time_stamp`) = YEAR(CURRENT_TIMESTAMP)";
$queryCount = mysql_query($sqlCount) or die(mysql_error());
$dates = array();
while(($row = mysql_fetch_assoc($queryCount))) {
$dates[] = $row['time_stamp'];
}
我想要的是 7 个不同的数组$monday $tuesday etc.
,每个数组都有数组中的天$dates
数