Say I have an a array like this:
Array (
[0] => "bananas, apples, pineaples"
[1] => "bananas, show cones"
[2] => ""
[3] => "apples, santa clause"
..
)
From that array I want to create a new array, holding each “tag”, and the number of times it occuredd in the first array, preferebly sorted alphabetically,like this:
Array (
[apples] => 2
[bananas] => 2
..
)
or
array (
[0] => [apples] => 2
..
)
1 Answer