[PHP] get the greatest key of an array???

2002-03-14 Thread Alex Elderson
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:

Re: [PHP] get the greatest key of an array???

2002-03-14 Thread Erik Price
On Thursday, March 14, 2002, at 09:47 AM, Alex Elderson wrote: 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) I think you mean the element with

RE: [PHP] get the greatest key of an array???

2002-03-14 Thread Rick Emery
krsort(array) then grab first key. -Original Message- From: Alex Elderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 8:47 AM To: [EMAIL PROTECTED] Subject: [PHP] get the greatest key of an array??? Hi, How can i get the greatest key of an array?? $array[1