| Counting things while going into an array I've just come up stumped on this one.
Basically, I'm parsing a log file. I want to count each time an occurence of something is in the file. I can open the file and read it in...it's just the counting part I can't figure out. I want to end up with something like this:
this_thing - 200 times
that_thing - 12 times
other_thing - 156 times
Any suggestions? |