I am currently sorting a multidimensional array using usort
which lists my arrays in order of highest to lowest based on value 1
, however with the highest sorted value, if there are multiple sub-arrays with the highest value I want to be able to then sort value 2
based on the highest to lowest. Is this possible?
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.
|
|||
|
You do this right within the same
|
|||||
|
take a look at http://php.net/manual/en/function.array-multisort.php you may be looking to do something like this:
|
|||
|