多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` <?php $fuck=[['aa'=>'34','bb'=>'33'],['aa'=>'43','bb'=>'41'],['aa'=>'13','bb'=>'12'],['aa'=>'88','bb'=>'40']]; function array_sort($arr,$keys,$orderby='asc'){ $keysvalue = $new_array = array(); foreach ($arr as $k=>$v){ $keysvalue[$k] = $v[$keys]; } if($orderby== 'asc'){ asort($keysvalue); }else{ arsort($keysvalue); } reset($keysvalue); foreach ($keysvalue as $k=>$v){ $new_array[] = $arr[$k]; } return $new_array; } echo "<pre>"; print_r(array_sort($fuck,'aa','desc')); echo "<pre>"; ?> ```