asort — 对数组进行排序并保持索引关系

 

说明

asort ( array &$array [, int $sort_flags = SORT_REGULAR ] ) : bool

本函数对数组进行排序,数组的索引保持和单元的关联。主要用于对那些单元顺序很重要的结合数组进行排序。SEO学院

Note:

If two members compare as equal, their relative order in the sorted array is undefined.

参数

 

array

输入的数组。

sort_flags

可以用可选的参数 sort_flags 改变排序的行为,详情见 sort()。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。 

原文地址:https://www.cnblogs.com/furuihua/p/12894811.html