F.2. Arrays
Function | Returns | Description |
---|---|---|
krsort(array array_arg [, int sort_flags]) | bool | Sorts an array by key value in reverse order. |
ksort(array array_arg [, int sort_flags]) | bool | Sorts an array by key. |
count(mixed var [, int mode]) | int | Counts the number of elements in a variable (usually an array). |
natsort(array array_arg) | void | Sorts an array using natural sort. |
natcasesort(array array_arg) | void | Sorts an array using case-insensitive natural sort. |
asort(array array_arg [, int sort_flags]) | bool | Sorts an array and maintains index association. |
arsort(array array_arg [, int sort_flags]) | bool | Sorts an array in reverse order and maintains index association. |
sort(array array_arg [, int sort_flags]) | bool | Sorts an array. |
rsort(array array_arg [, int sort_flags]) | bool | Sorts an array in reverse order. |
usort(array array_arg, string cmp_function) | bool | Sorts an array by values using a user-defined comparison function. |
uasort(array array_arg, string cmp_function) | bool | Sorts an array with a user-defined comparison function and maintains index association. |
uksort(array array_arg, string cmp_function) | bool | Sorts an array by keys using a user-defined comparison function. |
end(array array_arg) | mixed | Advances array argument's internal pointer to the last element and returns it. |
prev(array array_arg) | mixed | Moves array argument's internal pointer to the previous element and returns it. |
next(array array_arg) | mixed | Moves array argument's internal pointer to the next element and returns it. |
reset(array array_arg) | mixed ... |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.