$users = array( array('name' => 'tom', 'age' => 20) , array('name' => 'anny', 'age' => 18) , array('name' => 'jack', 'age' => 22) ); $ages = array(); foreach ($users as $user) { $ages[] = $user['age']; } array_multisort($ages, SORT_ASC, $users); 或者DESC
原创文章,作者:Carrie001128,如若转载,请注明出处:https://blog.ytso.com/272773.html