<?php
 
class Statistics {
 
    public $meta = array();
    public $result;
    private $meger = array();
 
    function __construct() {
        $this->meta[] = func_get_args();
    }
 
    public function show() {
 
        foreach ($this->meta[0] as $value) {
            foreach ($value as $subvalue) {
                if (!in_array($subvalue, $this->meger)) {
                    $this->meger[] = $subvalue;
                    $this->result["$subvalue"] = 1;
                } elseif (in_array($subvalue, $this->meger)) {
                    $this->result["$subvalue"] ++;
                }
            }
        }
        print_r($this->result);
    }
 
}
 
$arr1 = array('a', 'b', 'd');
$arr2 = array('d', 'de', 'ef');
$arr3 = array('a', 'ef', 'r', 'q');
$arr4 = array('b', 'de', 'q', 'z');
$arr5 = array('1', 'de', 'q', '3r');
$arr6 = array(1, 2, 'mn', '0y');
$arr7 = array(1, 'v2d', 'mn', '0y');
$s = new Statistics($arr1, $arr2, $arr3, $arr4, $arr5, $arr6, $arr7);
$s->show();
?>

 

稳定

产品可用性高于99.9%

贴心

全国7*24小时客服热线

专业

产品经理在线技术支持

快速

快速上线运营快

承诺

我们选择声誉

坚持

10年专注高端品质开发
  • 返回顶部