I need to generate two numbers that are NOT equal in PHP.
I know that I use $random1 = (rand()%9);
to generate random a number between 0-9. I need to add something to this I guess.
Thanks!
$random1 = 4;
$random2 = 5;
$numbers = array_rand(range(0, 9), 2);
echo '<pre>';
print_r($numbers);
echo '</pre>';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With