I have a multi dimensional array
Array
(
[M] => Array
(
[0] => Array
(
[first] => Paul
[last] => Martha
[progress] => 100
[id] => 85162
[category] => M
)
[1] => Array
(
[first] => Bob
[last] => Marley
[progress] => 47
[id] => 846523
[category] => M
)
)
[M~F1] => Array
(
[0] => Array
(
[first] => Kenneth
[last] => Rodriguez
[progress] => 42
[id] => 110273
[category] => M~F1
)
[1] => Array
(
[first] => Jenifer
[last] => Lopez
[progress] => 0
[id] => 485623
[category] => M~F1
)
)
)
However, I want each of the smaller arrays to sort themselves alphabetically based on keys from he array inside of them. Take array M for example. I want PHP to organize its subcompenets by alphabetizing the Last name componet. So, array M would organize its subarrays by alphabetizing the subarray of the subbaray. Once complete, it should look like this:
Array
(
[M] => Array
(
[0] => Array
(
[first] => Bob
[last] => Marley
[progress] => 47
[id] => 846523
[category] => M
)
[1] => Array
(
[first] => Paul
[last] => Martha
[progress] => 100
[id] => 85162
[category] => M
)
)
[M~F1] => Array
(
[0] => Array
(
[first] => Jenifer
[last] => Lopez
[progress] => 0
[id] => 485623
[category] => M~F1
)
[1] => Array
(
[first] => Keneth
[last] => Rodriguez
[progress] => 42
[id] => 110273
[category] => M~F1
)
)
)
So, to review, I ned to organize the subsub array by looking at the subsubsub array, gathering its [last] key and sorting the subsub array from the alphabetization of the[last] key of the subsubsub array.