<?php $arr =array(); for($x = 1; $x < 6; $x++){ //set each white ball variable (a through e) to a random number between 1 and 69 While (count($arr) != 5){ $arr[] = floor((lcg_value() * 6 + 1)); $arr = array_unique($arr); } //set powerball number variable to a number between 1 and 26 $f = floor((lcg_value() * 26 + 1)); Var_dump($arr); //echo all white ball numbers and powerball number //echo "<b><u>Set #" . $x . "</u></b> - <b>White ball numbers are: </b>" . $a . " , " . $b . " , " . $c . " , " . $d . " , " . $e . ". <b>Powerball Number is </b>" . $f . ".<br />"; };
You have javascript disabled. You will not be able to edit any code.