Get total number of each unique value in an array?

guangshi

New Member
Okay, so I've got an array that has a ton of random numbers in it, like this...\[code\]$array = array(134, 12, 54, 134, 22, 22, 1, 9, 45, 45, 12, 134, 45, 134);\[/code\]What I need to do, is find out what numbers are contained in my array, and if a number is duplicated in the array, I'd like to know how many times that number is found within the array. So taking the array that I listed above, I need the results to be something like this:\[code\]134: 412: 254: 122: 21: 19: 145: 3etc.\[/code\]Any bright ideas on how this might be accomplished?Thanks!
 
Back
Top