Hello nefar,

Friday, January 9, 2004, 6:05:34 AM, you wrote:

n> After moving my PHP files to a new hard drive and a new windows
n> installation, my rand function gets stuck and only gives you one number over
n> and over.  It worked a few times then got stuck.  I tried using IIS 5.1 (I
n> was using Xitami) and it gave me the same results.  It even gets stuck on
n> the same number as the other webserver. I tried installing on a different
n> machine.  Same result.  Can anyone help?

Which version of PHP are you using? If it's earlier than 4.2.0 you
need to see the rand() function first, or it will return the same
numbers each time. Use srand() to do this.

Also, are you passing in values to the rand() function? (your min and
max values) - on Windows there is a limit on the max value of 32,768.

-- 
Best regards,
 Richard                            mailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to