Re: [PHP] rand() function not working right

2003-08-31 Thread john
hope not ... winxp - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 31, 2003 5:13 PM Subject: Re: [PHP] rand() function not working right > * Thus wrote john ([EMAIL PROTECTED]): > > youre not t

Re: [PHP] rand() function not working right

2003-08-31 Thread Curt Zirzow
* Thus wrote john ([EMAIL PROTECTED]): > youre not the only one .. i just installed 4.3.3 and $x = rand(1,173); > always returns 101 for $x > > i changed to mt_rand(1,173); and that always returns 142 ??? > > weirdness .. dont tell me this is happening to only me? it works find with 4.3.3RC1 on

Re: [PHP] rand() function not working right

2003-08-31 Thread John T. Beresford
101 for $x i changed to mt_rand(1,173); and that always returns 142 ??? weirdness .. dont tell me this is happening to only me? - Original Message - From: <[EMAIL PROTECTED]> To: "php general list" <[EMAIL PROTECTED]> Sent: Thursday, May 29, 2003 4:29 AM Subject: [PH

Re: [PHP] rand() function not working right

2003-08-31 Thread john
eneral list" <[EMAIL PROTECTED]> Sent: Thursday, May 29, 2003 4:29 AM Subject: [PHP] rand() function not working right > I'm using the latest php and the rand() function isn't working properly when > giving it any min and max arguments. > It does work without anything

[PHP] rand() function not working right

2003-05-29 Thread ldg
I'm using the latest php and the rand() function isn't working properly when giving it any min and max arguments. It does work without anything between the () but if I put a min and max, then only the min value always gets chosen. Is that a bug? Is that new? I'm not using an old php version, and

RE: [PHP] Rand function

2002-01-22 Thread Jon Haworth
> Can anyone tell me why, when I run this > $number = rand (1,12); > The only number that ever appears is 5? > Not really a random number... You need to seed the random number generator first. http://www.php.net/srand HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e

Re: [PHP] Rand function

2002-01-22 Thread Jason Wong
On Tuesday 22 January 2002 18:52, Sam wrote: > Hi all, > > Can anyone tell me why, when I run this > > $number = rand (1,12); > The only number that ever appears is 5? > Not really a random number... You need to seed the random number generator using srand(). Best to read the online annotated m

[PHP] Rand function

2002-01-22 Thread Sam
Hi all, Can anyone tell me why, when I run this $number = rand (1,12); The only number that ever appears is 5? Not really a random number... Thanks Sam