note 39339 deleted from function.rand by nlopess

From: Date: Sun, 25 Jan 2004 16:24:25 +0000
Subject: note 39339 deleted from function.rand by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64153@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 srand() before rand() in order to get a different random value on refresh. Otherwise the same value kept coming up. function get_random() { $randomnumber = srand(); $randomnumber = rand(1,92); print $randomnumber; }

« previous php.notes (#64153) next »