/**
* @param $arrUsers
* @return mixed
*二维数组某个字段进行排序
*/ function quick_sort($arrUsers)
{
$sort = array(
'direction' => 'SORT_DESC', //排序顺序标志 SORT_DESC 降序;SORT_ASC 升序
'field' => 'share_num', //排序字段
);
$arrSort = array();
foreach($arrUsers AS $k => $v){
foreach($v AS $key=>$value){
$arrSort[$key][$k] = $value;
}
}
if($sort['direction']){
array_multisort($arrSort[$sort['field']], constant($sort['direction']), $arrUsers);
} return $arrUsers; }