Is it possible to use usort
to sort multiple fields in a multidimensional array? For example, I want to sort name
alphabetically and then from those records I want to sort them by age
. Is this possible using sort
?
Array (
[0] => Array (
[name] => Jonah
[age] => 27
)
[1] => Array (
[name] => Bianca
[age] => 32
)
)