Array Count (Fairly Simple)
Ok, this should be fairly simple... I have an array that contains the following:
114,151,157,151,10,12,14,151,157,10
What I want to do is this: I need to count how many instances of each number show up in this string. Ie the result that I want is this:
114 shows up 1 time
151 shows up 3 times
157 shows up 2 times
10 shows up 2 times
12 shows up 1 time
14 shows up 1 time
Then from there I need to match it back up so I can define this in an orderly fashion..
I.e.
if $variable1 = "114" then $counted1 = "1",
if $variable2 = "151" then $counted2 = "3",
and so-on.
Does any of this make any sense? This is definitely a new one for me.
----------
~cmiller
__________________
----------
~cmiller
|