I've got an array as such:
$currentTerm = array(
'name' => $term->name,
'weight' => $term->weight
);
I'd like to sort the entire array by the weight
key. I can't figure out how to accomplish this. Any thoughts or should I write a custom function for this?
P.S Some weights can be the same; so storing them as a key isn't an option. And it's multidimensional with a children key which is filled recursively the same way as above.