直接Demo:
$person = array(
array('num'=>'001','id'=>6,'name'=>'zhangsan','age'=>21),
array('num'=>'001','id'=>7,'name'=>'ahangsan','age'=>23),
array('num'=>'003','id'=>1,'name'=>'bhangsan','age'=>23),
array('num'=>'001','id'=>3,'name'=>'dhangsan','age'=>23),
);
//先把要排序的字段组合成一维数组
$ids= array();
foreach ($person as $user) {
$ids[] = $user['id'];
}
array_multisort($ids, SORT_ASC, $person ); //排序