Showing 7 of 1,216 result(s)
Option Result Original Order 0 1 2 3 4 5 6 7 8 9 10 11 12 SORT_REGULAR 7 6 3 1 0 5 2 11 10 9 4 8 12 SORT_STRING 7 6 3 1 0 5 2 11 10 9 4 8 12
The SORT_FLAG_CASE flag can be combined with the SORT_STRING flag to treat each item as a string while also ignored the case of each item. The following example shows how to use the SORT_STRING with the SORT_FLAG_CASE flag when sorting the...
Option Result Original Order 0 1 2 3 4 5 6 7 8 9 10 11 12 SORT_STRING 7 6 3 1 0 5 2 11 10 9 4 8 12 SORT_STRING | SORT_FLAG_CASE 7 6 1 0 5 2 11 10 9 4 3 8 12
The SORT_LOCALE_STRING treats each item as a string, while also taking into account the current locale, when doing the comparison. The following code example shows how to use the SORT_LOCALE_STRING flag when sorting the $collection created...
Option Result Original Order 0 1 2 3 4 5 6 7 8 9 10 11 12 SORT_REGULAR 7 6 3 1 0 5 2 11 10 9 4 8 12 SORT_LOCALE_STRING 7 6 3 1 0 5 2 11 10 9 4 8 12
The SORT_NATURAL treats each item as a string while using a "natural ordering" algorithm to perform the sorting. The following code example shows how to use the SORT_NATURAL flag when sorting the $collection created previously (the callback...
Option Result Original Order 0 1 2 3 4 5 6 7 8 9 10 11 12 SORT_REGULAR 7 6 3 1 0 5 2 11 10 9 4 8 12 SORT_NATURAL 7 6 3 1 0 5 2 11 10 9 4 8 12