{
$random = int(rand($upper));
}
print $random;
Any suggestions?
$low=50;
$high =50000;
loop: $rnum =rand($high);
goto loop if $rnum < $low;
$rnum =int($rnum);
I've never tried it with the ? : type if syntax, but I don't believe it would be faster.
(and your right...there has to be a better way).