function arrSort($arr,$field,$sort='asc'){$newArr = $sortArr = [];foreach($arr as $key=>$value){$newArr[$key] = $value[$field];}if($sort=='asc'){asort($newArr);}else if($sort=='desc'){arsort($newArr);}reset($newArr);foreach($newArr as $k=>$v){$sortArr[$k] = $arr[$k];}return $sortArr;}
function arrSort($arr,$field,$sort='SORT_DESC'){
$newArr = array_column($arr,$field);
return array_multisort($newArr,$sort,$newArr);
}