php中asort()函数如何用
php中asort()函数如何用
asort()函数作用:
php中asort()函数的作用是对关联数组依照键值进行升序排序。
asort()函数语法:
asort(array,sortingtype);
参数:
array:表示需要进行排序的数组。
sortingtype:表示规定排列数组的元素。
asort()函数使用方法:
例:将关联数组依照键值进行升序排序
$age=array("Bill"=>"60","Steve"=>"56","Mark"=>"31");
asort($age);
?>
文章来源:丸子建站
文章标题:php中asort()函数如何用
https://www.wanzijz.com/view/3881.html