How to find the duplicate and highest value in an array

Posted by Jerry on Stack Overflow See other posts from Stack Overflow or by Jerry
Published on 2010-06-05T13:31:00Z Indexed on 2010/06/05 13:32 UTC
Read the original article Hit count: 181

Filed under:
|
|

Hello guys I have an array like this

array={'a'=>'2','b'=>'5', 'c'=>'6', 'd'=>'6', 'e'=>'2'};

The array value might be different depending on the $_POST variables. My question is how to find the highest value in my array and return the index key. In my case, I need to get 'c' and 'd' and the value of 6. Not sure how to do this. Any helps would be appreciated. Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about array