Array Sorting
8 entries
array_multisort
Sorts multiple arrays jointly in the given order, keeping elements aligned across arrays.
arsort
Sorts an array in place descending by value while keeping key-value association.
asort
Sorts an array in place ascending by value while keeping key-value association.
ksort
Sorts an array in place ascending by key while keeping key-value association.
natsort
Natural order: digit segments compare by value (img2 < img10), text segments lexically; key-value bindings kept; natcasesort is the case-insensitive variant.
rsort
Sorts array elements in place in descending order.
shuffle
Shuffles array elements randomly (values kept, keys rebuilt as integers; associative keys lost); not cryptographically secure, seedability only via the global mt_srand.
usort
Sorts an array in place with a user-supplied comparison callback and rebuilds numeric indexes.