Wynik, nie dziala - moze cos robie zle?
$array[0]: 100 $array[1]: 400 $array[2]: 50
a ma byc tak:
$array[0]: 400 $array[1]: 100 $array[2]: 50
<?php
function cmp($a, $b)
{
return strcmp($a["e_months0"], $b["e_months0"]); }
0 =>
'id' => '1',
'nick' => 'AndyPSV',
'status' => 'admin',
'first_name' => 'Andrzej Jeziorski',
'c_months3' => 0,
'c_months1' => 0,
'c_months0' => 5,
'c_months_now' => 3,
'e_months3' => '',
'e_months1' => '',
'e_months0' => '100',
'this_month' => 500,
),
1 =>
'id' => '2',
'nick' => 'Toruniak',
'status' => 'caller',
'first_name' => '',
'c_months3' => 0,
'c_months1' => 0,
'c_months0' => 0,
'c_months_now' => 0,
'e_months3' => '',
'e_months1' => '',
'e_months0' => '50',
'this_month' => 0,
),
2 =>
'id' => '2',
'nick' => 'Toruniak',
'status' => 'caller',
'first_name' => '',
'c_months3' => 0,
'c_months1' => 0,
'c_months0' => 0,
'c_months_now' => 0,
'e_months3' => '',
'e_months1' => '',
'e_months0' => '400',
'this_month' => 0,
),
);
while (list
($key, $value) = each($array)) { echo "\$array[$key]: " . $value["e_months0"] . "\n"; }
?>