On Saturday 15 November 2003 02:38, Teren wrote:
> Sorry, i copied a little extra stuff from console. This is what it is,
> Anyways, it works fine if I put 0 in for 1 on line 9 where it uses the
> rand(), but it include 0 and I can't have 0. Is there some way to fix that?
> If you need to see the d
Teren wrote:
> Anyways, it works fine if I put 0 in for 1 on line 9 where it
> uses the rand(), but it include 0 and I can't have 0.
Why not just change the following:
> if($ran == $sh) {
> $add = "no";
> }
to:
> if($ran == $sh || $ran == 0) {
> $add = "no";
>
lmes" <[EMAIL PROTECTED]>
To: "Teren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 1:28 PM
Subject: Re: [PHP] Random Function
> You're code doesn't make sense. You're looking for 3 random numbers,
between
> 1 and 3 i
s...
- Original Message -
From: "Teren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2003 1:05 PM
Subject: [PHP] Random Function
Hi, I have the following function that generates a random number, but the
key is it only generates the number onc
Hi, I have the following function that generates a random number, but the key is it
only generates the number once within the range you specify. So, if you want a range
of 5 numbers, it will give you 5 different numbers. My problem is the function was set
to start at 0, but I need it to start at
5 matches
Mail list logo