RE: [PHP] get the greatest key of an array???
| From: | Rick Emery | Date: | Thu, 14 Mar 2002 15:03:34 +0000 |
| Subject: | RE: [PHP] get the greatest key of an array??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-88508@lists.php.net to get a copy of this message | ||
krsort(array)
then grab first key.
-----Original Message-----
From: Alex Elderson [mailto:alex@netflex.nl]
Sent: Thursday, March 14, 2002 8:47 AM
To: php-general@lists.php.net
Subject: [PHP] get the greatest key of an array???
Hi,
How can i get the greatest key of an array??
$array[1] = "...";
$array[5] = "...";
$array[0] = "...";
$array[10] = "...";
$array[7] = "...";
$greatest_key = ??? (this must be 10 in this example)
Alex Elderson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php