统计次数 大神进去帮忙

WBOY
Release: 2016-06-13 13:15:13
Original
758 people have browsed it

统计次数 大神进来帮忙


这是一个数组 太长了 我没有截完.

我想做到功能是看下这个二维数组中有多少个 一维数组字段forumid =6491 以此类推 继续做循环看下 第二个一维数组字段 forumid =6107 在这个二维数组中有几个 继续第三个, 第四个

------解决方案--------------------
forumId=>6491在数组出现的次数吗?
------解决方案--------------------
foreach($你的数组 as $v) $ar[] = $v['forumid'];

print_r(array_count_values($ar));

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!