View Full Version : PHP question !
How do you get a random number from 1 to 10 ? :)
viper2K1
12-01-2002, 10:32 AM
srand((double)microtime()*1000000);
echo rand(1,10);
i think :)
Mr Woody
12-01-2002, 10:34 AM
<?
echo rand(1, 100);
?>
http://dk.php.net/manual/en/function.mt-rand.php
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.