假设我有一个这样的数组:
Array (
[0] => "bananas, apples, pineaples"
[1] => "bananas, show cones"
[2] => ""
[3] => "apples, santa clause"
..
)
从该数组中,我想创建一个新数组,保存每个“标签”,以及它在第一个数组中出现的次数,最好按字母顺序排序,如下所示:
Array (
[apples] => 2
[bananas] => 2
..
)
或者
array (
[0] => [apples] => 2
..
)