I can find an answer to this if the first dimension of the array is an offset, but not if they are keys. I need to sort the array by the value of an inner key, while keeping the main array's keys intact.
Consider this example multi-array..
$test['first']['count']=23;
$test['first']['name']='foo';
$test['first']['type']='red';
$test['second']['count']=54;
$test['second']['name']='bar';
$test['second']['type']='green';
$test['third']['count']=11;
$test['third']['name']='foobar';
$test['third']['type']='blue';
So I would like to order the array highest to lowest based on 'count'. Looking at the above, the order would be this...
$test['second']
$test['first']
$test['third']
How can it be solved? Help appreciated, thanks!