PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function rollDice() { $roll = []; for ($i = 0; $i <= 4; $i++) { $value = rand(1, 6); $roll[] = $value; } //print_r($roll); return $roll; } $result = rollDice(); print_r($result); $checkArray = array_count_values($result); print_r($checkArray);
Show:  
Copy Clear