Let's say $mynum = 3. What function can give me a random number from 1-99 except the current value of $mynum? Noob here (obviously).
Or something like this: $num = rand(1,99); while($num == $mynum){ $num = rand(1,99); } $mynum = $num; echo $mynum. Other option is to use an array: $arr = range(1,99); $mynum = $arr[rand(1,99)];
<?php $mynum = 3; $rand = rand(1,99); if($rand == $mynum) { $rand = rand(1,99); } echo $rand; ?> Code (markup): that should be what you want