Home » Tag Archives:sorting (page 3)

Tag Archives: sorting

Multi-sorting arrays … – PHP

February 23, 2020 Php Leave a comment

Q(Question): I have been trying to get an array to sort on a particular column and have been having problems with my main key … array_multisort($dirlist["dirname"], SORT_DESC, SORT_STR...

Sorting arrays – PHP

February 23, 2020 Php Leave a comment

Q(Question): I’m having some trouble understanding what is happening with some array sorting functions. In all cases, my compare function is: function compare($x, $y) { if ( $x[1] == $y[1] ) ret...