Hot answers tagged

5 votes
Accepted

Sort array of associative arrays by the key of the subarrays

Short of simplifying your input array structure, using functional sorting will be most direct with array_multisort() which is fed an array of keys to sort in a ...
  • 7,936
3 votes

Sort array of associative arrays by the key of the subarrays

Bubble sort algorithm - inefficiently implemented After each iteration of the Bubble sort algorithm "one less element (the last one) is needed to be compared until there are no more elements left ...
2 votes

Sort array of associative arrays by the key of the subarrays

I solved it with usort like recommended by @greybeard. Credits to him! ...
  • 243

Only top scored, non community-wiki answers of a minimum length are eligible