`php array operations

A. Sorting an array

1. sort () function is a numeric index array is ordered. For ascending alphabetical, uppercase before lowercase letters

2.asort () and ksort () are key array is sorted according to the value, and keywords.
3.asort () is the sort of value for each element, ksort () is a key element of the sort.

Reverse Sort Order

Reverse order is sorted result of the foregoing three functions performed in reverse order, from the point of view the function name, only we need to add a function name to r.
sort (), asort (), ksort () in reverse order correspond: rsort (), arsort (), krsort () .

Array Functions  https://www.runoob.com/php/php-ref-array.html

Guess you like

Origin www.cnblogs.com/jiangfeilong/p/11267136.html
Recommended