unique random number

From: Date: Tue, 08 Aug 2000 14:17:31 +0000
Subject: unique random number
Groups: php.general 
Request: Send a blank email to php-general+get-10663@lists.php.net to get a copy of this message
Hi, Every time i create a page, i want a random number (0..9) to be generated but it may not be the same number as the previous number so: srand((double)microtime()*1000000); $number = rand(0,9); with this code sometimes the value of $number is the same as the previous number is it in some way possible to solve this problem without using a database?

« previous php.general (#10663) next »