Personal I'm creating a draw system in PHP language Here is an excerpt of the code I started to program but the problem is that there are 19 different hit combinations this one down here is just the first! is there a more practical way to do it without having to use as many IF statement lines?
<?php
...................
//primeira combinação de acertos
if (($d1=3) && ($d7=3) && ($d8=3) && ($d9=3) && ($d5=3))
echo "ganhou 12 pontos";
if (($d1=2) && ($d7=2) && ($d8=2) && ($d9=2) && ($d5=2))
echo "ganhou 12 pontos";
if (($d1=1) && ($d7=1) && ($d8=1) && ($d9=1) && ($d5=1))
echo "ganhou 12 pontos";
?>
complementing, there are 19 combinations of the variables $ d1 to $ d15, but apparently the friend solved the question, ($ d1 == $ d7 & d7 == $ d8 & & d8 == $ d9 & & d9 == $ d5) echo "earned 12 points"; for each of the 19 combinations