Re: How can I get a random number

From: Date: Tue, 16 Jan 2001 22:12:40 +0000
Subject: Re: How can I get a random number
Groups: php.general 
Request: Send a blank email to php-general+get-34904@lists.php.net to get a copy of this message
I see that you got a lot of responses, but I didn't see anyone using what I use. I had problems using rand() because it wasn't quite random enough. The following code is as random as you can get (at least from what I've seen). mt_srand ((double) microtime() * 1000000); $myrandomnumber = mt_rand($min_number, $max_number);

« previous php.general (#34904) next »