What's the easiest way to sort a multi dimensional array. I need to sort it so the output is displayed with the highest count of values on the sub arrays then the sorted alphabetically by the key of the sub arrays:
So something like this:
MyArray(
subarray4('val1')
subarray2('val1')
subarray3('val1', 'val2', 'val3')
subarray1('val1', 'val2', 'val3')
)
Would look more like this:
MyArray(
subarray1('val1', 'val2', 'val3')
subarray3('val1', 'val2', 'val3')
subarray2('val1')
subarray4('val1')
)