私は(UNSORTED VERSION)のタイプの配列を持っています:
<?php
$arr['foo']['man'] = 5 ;
$arr['foo']['str'] = 'string5' ;
$arr['foobar']['man'] = 2 ;
$arr['foobar']['str'] = 'string2' ;
$arr['barfoo']['man'] = 4 ;
$arr['barfoo']['str'] = 'string4' ;
$arr['foofoo']['man'] = 1 ;
$arr['foofoo']['str'] = 'string1' ;
$arr['bar']['man'] = 3 ;
$arr['bar']['str'] = 'string3' ;
?>
その配列内の他のすべてのデータを保持しながら、降順で並べ替えたい、つまり
<?php
$arr['foo']['man'] = 5 ;
$arr['foo']['str'] = 'string5' ;
$arr['barfoo']['man'] = 4 ;
$arr['barfoo']['str'] = 'string4' ;
$arr['bar']['man'] = 3 ;
$arr['bar']['str'] = 'string3' ;
$arr['foobar']['man'] = 2 ;
$arr['foobar']['str'] = 'string2' ;
$arr['foofoo']['man'] = 1 ;
$arr['foofoo']['str'] = 'string1' ;
?>
私はPHPで多くのソート機能を見てきましたが、解決策は見つかりませんでした
誰でも私を助けることができますか?前もって感謝します。