Ich habe folgendes Array:
$arr[0][0]="Hallo_00";
$arr[0][1]="Hallo_01";
$arr[0][2]="Hallo_02";
$arr[1][0]="Hallo_10";
$arr[2][0]="Hallo_20";
$arr[2][1]="Hallo_21";
$arr[2][2]="Hallo_22";
$arr[2][3]="Hallo_23";
$arr[3][0]="Hallo_30";
$arr[3][1]="Hallo_31";
// Ich möchte es mit ...
uasort($arr, "spez_sort");
function spez_sort ($dat1, $dat2){
$retdat = 0;
if(count(?????) > count(?????)) $retdat = 1;
else if(count(?????) < count(?????)) $retdat = -1;
return $retdat;
}
// ... so sortieren, das es nach der Anzahl/Menge ( count($arr[?????]) der Elemente im ersten Schlüssel absteigend sortiert ist:
$arr[2][0]="Hallo_20";
$arr[2][1]="Hallo_21";
$arr[2][2]="Hallo_22";
$arr[2][3]="Hallo_23";
$arr[0][0]="Hallo_00";
$arr[0][1]="Hallo_01";
$arr[0][2]="Hallo_02";
$arr[3][0]="Hallo_30";
$arr[3][1]="Hallo_31";
$arr[1][0]="Hallo_10";
Vielen Dank,
Mario