21,893
社区成员
发帖
与我相关
我的任务
分享
$abc = array(
array(1,2,3),
array(1,1,1),
array(2,3,3)
);
foreach($abc as $v) {
@$r[$v[0]]++;
}
echo max($r); //2
$abc = array(
array(1,2,1),
array(1,1,2),
array(4,3,3),
array(4,4,4),
);
foreach($abc as $t) {
foreach($t as $v) @$r[$v]++;
}
print_r($r);
Array
(
[1] => 4
[2] => 2
[4] => 4
[3] => 2
)