in reply to Re: Need help with number generator
in thread Need help with number generator

This idea rocks. But I think this is correct
$random = 2 + ( int( rand( 10 ) ) <=> 8 );

this will make
$random = 1 ...... 80% of the time
$random = 2 ...... 10% of the time
$random = 3 ...... 10% of the time