Re: Array difficulty
| From: | Richard Lynch | Date: | Wed, 08 Aug 2007 04:48:40 +0000 |
| Subject: | Re: Array difficulty | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260420@lists.php.net to get a copy of this message | ||
On Tue, July 31, 2007 8:27 am, Carlton Whitehead wrote:
> I have an array like this:
>
> $chance = array("lowercase" => 27, "uppercase" => 62,
> "integer" =>
> 46);
>
> The values for each of the keys are randomly generated. I want to find
> the key name of the one which has the highest value. Currently, I'm
> doing this as follows:
>
> arsort($chance);
$result = key($chance);
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?