...

View Full Version : Generating a random number within a range...



sir pannels
03-03-2003, 09:47 AM
hey :)
hmm so generating a random number is easy enough i can do that. i always get like 1000+ tho... i need to have a random number between 3 and 8... anyone have any ideas? lnks to tuutoirals etc?
thanks :thumbsup:
P

Galdo
03-03-2003, 10:32 AM
srand((double)microtime()*1000000);
$number = rand(3,8);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum