Re: [PHP] Random Function

2003-11-16 Thread Jason Wong
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 demo

Re: [PHP] Random Function

2003-11-14 Thread CPT John W. Holmes
You're code doesn't make sense. You're looking for 3 random numbers, between 1 and 3 inclusive. Umm.. 1,2,3. Do you want them in a random order, or something? Maybe the upper limit of rand() and how many numbers you're looking for ($n), should be different?? ---John Holmes... - Original

Re: [PHP] Random Function

2003-11-14 Thread Teren
) { set_num(); } ? - Original Message - From: CPT John W. Holmes [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

RE: [PHP] Random Function

2003-11-14 Thread Pablo Gosse
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; }