Finding most often occurring word in an array

Hi,
I’m getting confused thinking this through. I have an array with single words (strings) as each value. I want to find out which word occurs the most often in the array. I’m using strcasecmp to do the comparison, but I’m getting confused visualizing the model for what I want to do. I know I have to compare each word to each other word in the array, but how do I keep a count of which words are the same and ultimately which one occurs the most often? I’m thinking I need to use a for or foreach loop but, as I say, I’m confusing myself thinking about it. Any help most appreciated!

EN