Results 1 to 2 of 2
Thread: probabilty question
Jun 10, 2001, 18:07 #1
I am making a instant win game at my site and I need to find out how I can set the probability of a win occuring. I want the odds of winning to be something like 1 in 25000 but have it occur randomly sometime within that 25000. Not just make it occur on the 25000th time the script is run.
Does anyone understand what Im asking, I know its probally confusing.
Jun 10, 2001, 21:17 #2
- Join Date
- Mar 2001
- 0 Post(s)
- 0 Thread(s)
Uhhhmm...just generate a random number between 1 and 25,000 and then store it in a database? Check out mt_rand() at:
I think the maximum number it will generate is higher than 25,000. Also, don't forget to seed mt_rand() with mt_srand() before you generate the random number.
Last edited by 7stud; Jun 10, 2001 at 23:45.