1. 程式人生 > >ThinkPHP/---合併陣列後按時間排序

ThinkPHP/---合併陣列後按時間排序

$arr = array_merge($data,$human);
$ctime_str = array();
foreach ($arr as $key => $v) {
$arr[$key]['ctime_str'] = strtotime($v['ts']);
$ctime_str[] = $arr[$key]['ctime_str'];
}
array_multisort($ctime_str, SORT_DESC, $arr);