I went through all the similiar questions but couldn't find an answer....so here goes.
My current array, simplified:
[order] => Array ( [0] => Array ( [strSupplier] => XYZ (varying other fields) ) [1] => Array ( [strSupplier] => XYZ (varying other fields) ) [2] => Array ( [strSupplier] => YYZ (varying other fields) ) )
Code:
function custom_sort2($a,$b) { return $a['strSupplier']>$b['strSupplier']; } // Sort the multidimensional array usort($tempOrderArray, "custom_sort2");
Currently, I am sorting on only the supplier, however, I need to ensure that the key is the second sort criteria, and I am not sure that it is.
Is there a way I can guarantee that it is sorted by strSupplier first, then key? If this is built into either the uasort or usort function, I apologize - I did not see it.