PDA

View Full Version : PHP Randoom



jobesoft
February 10th, 2001, 11:03
Hello!
Can anybody help me with PHP? I need an simple script which creates an randoom number between 1 and 10 (only one digit logn like 1 2 3 etc not 1.5 ) . A Variable should be created an i should be able to copy and past it in an ready script. Thank you very much!

jw
February 10th, 2001, 13:27
<?
mt_srand((double)microtime()*1000000);
$randval = mt_rand(1,10);
?>

that should work :)