Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Many thanks Thomas and Maciek. I'll try removing mt_srand to start with, and if that doesn't work out I'll put in the uniqueness check. Cheers, Gordon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Thomas S. Crum - AAA Web Solution, Inc.
keown [mailto:[EMAIL PROTECTED] Sent: Saturday, November 27, 2004 11:44 AM To: [EMAIL PROTECTED] Subject: [PHP] Random number generation and phpBB search IDs Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I ha

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread M. Sokolewicz
Gordon McKeown wrote: Apologies, my mail client was supposed to line-wrap that for me - Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, s

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Apologies, my mail client was supposed to line-wrap that for me - Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, so I think I need to un

[PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, so I think I need to understand how PHP is dealing with this in order to resolve it. phpBB ge

[PHP] Random Number Generation

2003-03-20 Thread Christopher J. Crane
I have a script that loads 13 or more file names into an array. Then at random I select one of the names out of the array. This files are background songs used on my webpage. Streaming a different song each time the page is refreshed or loaded. My issue is I do not want the same song to ever be pla

Re: [PHP] Random number generation...

2001-05-02 Thread Phillip Bow
3B733@BOOTROS... > The manual also says: > mt_rand -- Generate a better random value > > I've been using mt_rand() over rand() every time - is there any reason not > to? > > Cheers > Jon > > > -Original Message- > From: elias [mailto:[EMAIL PROTECTED

RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth
The manual also says: mt_rand -- Generate a better random value I've been using mt_rand() over rand() every time - is there any reason not to? Cheers Jon -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 00:05 To: [EMAIL PROTECTED] Subject: Re: [PHP] R

Re: [PHP] Random number generation...

2001-05-02 Thread Avetis Avagyan
Regards, Avetis [EMAIL PROTECTED] wrote: > Hi there, > A potentially dumb question here. > > Is there an easy way to display a random number between 1 and 20? > > I have looked on line, but either I am looking inall teh wrong places, or there > isn't this script on-line. > > Can anyone point m

RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth
Wotcha Tris :-) Try this: mt_srand((double)microtime()*100); $my_random_number = mt_rand(1, 20); HTH Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 02 May 2001 12:07 To: [EMAIL PROTECTED] Subject: [PHP] Random number generation... Hi there, A

Re: [PHP] Random number generation...

2001-05-02 Thread elias
why not use the rand() ? manual says: rand -- Generate a random value Description int rand ([int min [, int max]]) If called without the optional min, max arguments rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for examp

[PHP] Random number generation...

2001-05-02 Thread Tristan . Pretty
Hi there, A potentially dumb question here. Is there an easy way to display a random number between 1 and 20? I have looked on line, but either I am looking inall teh wrong places, or there isn't this script on-line. Can anyone point me in the right direction? Cheers, Tris... ***