Hallo,
which array function gives the index of last element out?
Thanks
if your array keys lile 0 1 2 3 4 ...
$lastindex= count($ar)-1;
but if you are not sure
$ar_k=array_keys($ar); $lastindex=$ar_k[count($ar_k)-1];
will work
There is another way, though it may be something of a hack:
end($array); echo key($array); reset($array);
Thank you it works very well