Re: searching an array

From: Date: Tue, 29 Oct 2002 16:41:08 +0000
Subject: Re: searching an array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121899@lists.php.net to get a copy of this message
You could sort the values (ascending or descending), and select the first or last value (depending on how you sorted it). Davíð Örn Jóhannsson wrote:
I have a array called $arr[], it holds integer values, I don’t know how many indexes it holds and I need to be able to find out what the hash ($arr[index]) holds the largest value, is this possable, and if so how? Regards, David


« previous php.general (#121899) next »