Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Random Numbers
As the games rules states, we will need to generate random numbers.
You can only use zero or positive integer between 1 and 9.
Here are some hints, but you really should try to find by yourself.
Hints
Click to see some hints
To generate random numbers, you can use PHP built-in functions such as:
It is easier to use random_int
.
Solution
Click to see a way to generate random numbers
1
2
3
4
<?php
$n1 = random_int(0, 9);
var_dump($n1);
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content