<?php $data = array( 1001 => array( 'age' => 22, 'name' => '鸠摩智' ), 1007 => array( 'age' => 21, 'name' => '慕容复' ), 1004 => array( 'age' => 27, 'name' => '乔帮主' ) ); //根据字段age对数组$data进行升序排列 $ages = array_column($data, 'age'); array_multisort($ages, SORT_ASC, $data); print_r($data);