I've got an array of strings which have numerous instances of the same strings, and would like to find the top 3 strings and their associated count. I'm sure this has been done before so if you know of a quick and efficient way of accomplishing this I'd be very grateful. Thanks in advance for your time.
The array could contain for example an array of error codes
arr("MD04","MD03", "MD04","CP12","MD04","MD2",......")
So, would like to know "MD04" had 112 occurances and
"MD02" had 33 and so on....
The array could contain for example an array of error codes
arr("MD04","MD03", "MD04","CP12","MD04","MD2",......")
So, would like to know "MD04" had 112 occurances and
"MD02" had 33 and so on....