PHP: How to find most used array key?

Posted by oni-kun on Stack Overflow See other posts from Stack Overflow or by oni-kun
Published on 2010-04-06T19:50:13Z Indexed on 2010/04/06 19:53 UTC
Read the original article Hit count: 480

Filed under:
|
|

Lets say I have a simple 1D array with 10-20 entries. Some will be duplicate, How would I find out which entry is used the most? like..

$code = Array("test" , "cat" , "test" , "this", "that", "then");

How would I show "test" as the most used entry?

© Stack Overflow or respective owner

Related posts about php

Related posts about array