array_rand() and seed

From: Date: Tue, 23 Jul 2002 13:05:53 +0000
Subject: array_rand() and seed
Groups: php.general 
Request: Send a blank email to php-general+get-109073@lists.php.net to get a copy of this message
Using Win2K Professional Server, IIS PHP Version 4.2.1 mt_getrandmax() returned 2147483647 I have an array of 26 characters. I want three random values from the array, I use the following: $rand_al = array_rand ($arralpha, 3); I get the same characters each and every time. The way I am handling it right now is generating random values using mt_rand(0,25) and using those random values as the index of the array to retrieve the value of. Any ideas on this? Thanks. Naintara

« previous php.general (#109073) next »