我想按时间戳“1357894278”对职位进行排序
<?php
foreach( $jobs as &$job )
{
$cj_date[] = array( strtotime($job->date) => array( $job->title ));
}
foreach ($results['results'] as $result)
{
$in_date[] = array ( strtotime($result['date']) => array ($result['jobtitle']) );
}
$ans[] = array_merge($cj_date,$in_date);
foreach($ans as $a)
{
ksort($a);
print_r($a);
}
?>
通过运行这个脚本,我得到了如下输出:
Array( [0] => Array
( [1352796106] => Array
( [0] => JobTitle_1 )
)
[1] => Array
( [1352745201] => Array
( [0] => JobTitle_2 )
)
[2] => Array
( [1357894278] => Array
( [0] => JobTitle_3 )
)
)
那么如何按 1352796106、1352745201、1357894278 对 Job-Titles 进行排序 谢谢!等待帮助