in reply to Need help with number generator
$randnum = int(rand(100));
if ( $randnum > 20 ) #80%
#stuff for 1
if ( $randnum > 90 ) #10%
#stuff for 2 and 3
It would do #stuff for 1
_and_ #stuff for 2 and 3 10% of the time.
And 20% of the time it would do nothing...
Remember to think before you code! :-P
.desrever si txet eritne ehT
.backwards are (letters the not but) words the Only
ehT sdrow era ni redro, tub eht srettel era eht rehto yaw.
Who ndees baacdkrws wehn you have Tceilmopgyya?
?wdors reeersvd up meixd about How
.tusnnmihep rof nuttolg a m'I
Results (441 votes). Check out past polls.