有一个很大的数组 不用自带方法 怎么做呢?
回复内容:
有一个很大的数组 不用自带方法 怎么做呢?
为什么不用PHP的自带函数array_count_values
不用自带方法
<code> $tagList = array("Cat", "Dog", "Horse", "Dog"); $count = array(); foreach ($tagList as $tVal) { if (!i<p style="color:transparent">本文来源gao!%daima.com搞$代*!码$网3</p><strong>搞代gaodaima码</strong>sset($count[$tVal])) { $count[$tVal] = 1; } else { $count[$tVal]++; } }</code>