numeric: sorts numbers text: sorts text alphabetically, taking case into account (also known as case sensitive). All letters of one case precede the first letter of the other case: - aabzABZ, if sort_order = "asc" (ascending sort) - ZBAzbaa, if sort_order = "desc" (descending sort)
textnocase: sorts text alphabetically, without regard to case (also known as case-insensitive). A letter in varying cases precedes the next letter: - aAaBbBzzZ, in an ascending sort; preserves original intra-letter order - ZzzBbBaAa, in a descending sort; reverses original intra-letter order
asc: ascending sort order. Default. - aabzABZ or aAaBbBzzZ, depending on value of sort_type, for letters - from smaller to larger, for numbers
desc: descending sort order. - ZBAzbaa or ZzzBbBaAa, depending on value of sort_type, for letters - from larger to smaller, for numbers
The callback function which take two elements of an array, Returns whether the first is less than (-1), equal to (0) or greater than (1) the second one(like as compare function).
Examples sample code invoking the arraySort function
Simple example for arraySort function
Uses the arraySort() function to get the sorted array and which sorted by type numeric