On 19 Dec 2001, David wrote: > should be because rand() can\'t generate such a large number for u. > > use $max_random_number = getrandmax(); to check > > http://sg.php.net/manual/en/function.getrandmax.php
Hmmm... My webserver gives me no problems witht this at all. (Sun E250 with Solaris 8, Apache 1.3.20 and PHP4.6) This : <?PHP $floor = 100000; $ceiling = 999999; srand((double)microtime()*1000000); $random = rand($floor, $ceiling); print $random; ?> Gives me a 6-digit integer every time -- Knut ------ Knut H. Hassel Nielsen, [EMAIL PROTECTED] Principal Engineer, Office : ITS 204 IDI NTNU, Sem Saelands vei 7-9 N-7491 Trondheim, Norway Phone (+47) 73 59 18 46 Fax (+47) 73 59 60 35 "Programmers don't die, they just GOSUB without RETURN." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]