下面是我的一些代码部分:检查多个字符串的spesific数
<?php
$terning1 = rand(1,6);
$terning2 = rand(1,6);
$terning3 = rand(1,6);
$terning4 = rand(1,6);
$terning5 = rand(1,6);
$terning6 = rand(1,6);
//Here i need a system to check how many of them that gets number 6
?>
洙我需要的是方法来检查多少$ terning1-6返回数量6可以说$ terning1和$ terning4然后我需要一种方式告诉我,他们中的2人是6.我不知道我怎么能做到这一点,因为我从来没有做过这样的事情。
很抱歉,但我不知道如何保存所有那些在一个数组中,并且客栈这个代码我怎么得到有多少个6是?像$ howmany = SOMETHING; //应该给我的数量是6 –