note 39337 deleted from function.mt-rand by nlopess

From: Date: Sun, 25 Jan 2004 16:24:16 +0000
Subject: note 39337 deleted from function.mt-rand by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64152@lists.php.net to get a copy of this message
Note Submitter: geeksinceseven@yahoo.com ---- When using PHP 4.3.4 and IIS 5.1 I had to use mt_srand() before mt_rand() in order to get a different random value on refresh. Otherwise the same value kept coming up. function get_random() { $randomnumber = mt_srand(); $randomnumber = mt_rand(1,92); print $randomnumber; }

« previous php.notes (#64152) next »