$array= array(
'123456'=>array('aa','bb','cc'),
'12345645'=>array( 'aa','cc' ),
'1234564555'=>array('aa','dd','cc','bb'),
'12364555'=>array('a a','dd', ' cc'),
);
私が望む結果は
$array= array(
'12345645' => ;array('aa','cc'),
'123456'=>array('aa','bb','cc'),
'12364555'=>array(' aa' ,'dd','cc'),
'1234564555'=>array('aa','dd','cc','bb'),
ディスカッションへの返信 (解決策)
$array = array( '123456'=>array('aa','bb','cc'), '12345645'=>array('aa','cc'), '1234564555'=>array('aa','dd','cc','bb'), '12364555'=>array('aa','dd','cc'),);foreach($array as $i=>$v) { $r[] = count($v); $k[] = $i;}array_multisort($r, $k, $array);print_r(array_combine($k, $array));