Hi,
How do I filter out the largets/biggest key in an array?
Say I have this array :
Array ( [0] => Zero [2] => Two [4] => Four }
Then the output should be 4...
Can this be done?
Thanx, Niels w.j.kregting@chello.nl
You may try this:
$highest = 0; while(list($no, $line) = each($NAME_OF_THE_ARRAY)) { if($line > $highest) $highest = $line; } echo $highest;
Leif
Yes, I have already found something similar:
krsort ($array); reset ($array); list ($key,$val) = each ($array);
where $key is the largest keynumber...
Niels