I have a For
loop that has two mt_rand
, one of random numbers and another mt_rand
of numbers that are designated as prizes.
What I want to do now is check out 3 equal numbers, make the sum of the values that came out in this mt_rand
of the 3 numbers and return in a variable with the sum of these values.
PHP
for ($i = 0; $i<9; $i++){
$numeros = mt_rand(1,9);
$premio = mt_rand(1,20);
echo "valor" . ($i + 1) . "=$numeros&premio" . ($i + 1) . "=$premio&";
}