快3中,下注两个数字,与开奖的三个数字对比,for循环判断

版权声明:廖圣平博客,未经博主允许不得转载。企鹅:1194008361 https://blog.csdn.net/qq_22823581/article/details/78042535



    public function test(){
        $numa = '6,2,5';
        $sums = explode(',',$numa);
        $getsum =26;
        $add = '';
        $chaifenarr =str_split($getsum);
        for($i =0;$i<count($chaifenarr);$i++){
            $menpiao = 1;
            for($b =0;$b<count($sums);$b++){
                if($chaifenarr[$i] ==$sums[$b]){
                    if ($menpiao ==1){
                        $add+=1;
                       $menpiao =0;
                    }
                }
            }
        }
        echo $add;
    }


没有更多推荐了,返回首页