php 二维数组排序
$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),
);
function sort_by_name($x,$y){
return strcasecmp($x['name'],$y['name']);
}
uasort($person,'sort_by_name');
var_dump($person);