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?
- Original Message -
From: [EMAIL PROTECTED]
To: php general list
I can confirm that the funtion works fine using php 4.3.0. on Mac OS X.
While this may not be of any help, I will test on a later install on
a test server.
Thanks,
John
At 4:15 PM +1000 8/31/03, john wrote:
youre not the only one .. i just installed 4.3.3 and $x = rand(1,173);
always returns
* 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
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 the only one .. i just installed 4.3.3
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 manual
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,
6 matches
Mail list logo