I need to add up similar items in multidimensional array for a scoring system. So basically, I have this:
[AS]
myArray[0] = array(“apple”,“bananas”);
myArray[1] = array(“apple”,“oranges”,“kiwi”);
myArray[2] = array(“bananas”);
myArray[3] = array(“apple”,“cantaloop”,“kiwi”);
[/AS]
and I need to have the outcome of the top 3 from greatest to smallest. In this case, it would be: apple(3), bananas(2), kiwi(2)
Any ideas on how to do this?