I rack my brain trying to figure out how to do it right, I have this multidimensional array:
Array ( [0] => Array ( [time] => November 1st 10:10 [query] => movies [set] => 1 [matches] => No matching results [results] => 5 ) [1] => Array ( [time] => November 1st 10:10 [query] => cinemas [set] => 1 [matches] => No matching results [results] => 2 ) )
In real life there can be many more sub-arrays, but I say that I want to sort it by βqueryβ in alphabetical order, how can I achieve this?
I saw only solutions for an integer type or key index, the end result in this case would be:
Array ( [0] => Array ( [time] => November 1st 10:10 [query] => cinemas [set] => 1 [matches] => No matching results [results] => 2 ) [1] => Array ( [time] => November 1st 10:10 [query] => movies [set] => 1 [matches] => No matching results [results] => 5 ) )
Thank you very much.
Itai sagi
source share