foreach($recomend_total as $k=>$v){
$flag[] = $v['applyitem_id'];
}
array_multisort($flag,SORT_ASC,$recomend_total);
遍历$recomend_total数组.取出需要排序的字段,
<?php
echo '<meta http-equiv="Content-type" content="text/html:charset=utf-8">';
echo '<pre>';
$aa =array(
'12'=>array('aa'=>'aaa','bb'=>'bbb'),
'23'=>array('cc'=>'ccc','dd'=>'ddd')
);
$bb =array(
'44'=>array('ee'=>'eee','ff'=>'fff'),
'77'=>array('gg'=>'ggg','hh'=>'hhh')
);
$cc = $aa+$bb; //保留键名,合并数组..适合不同id做键名 对应的不同交通方式
var_dump($cc);