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
Yes, I watch meteor showers
No, I do not watch meteor showers
My meteors prefer to bathe
Results (200 votes). Check out past polls.