亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

mysql - php How to generate a prize based on the prize's winning probability value (0-10000)?
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-05-16 12:59:16
0
1
571

How to generate a prize based on the prize's winning probability value (0-10000) in php?
How to implement the algorithm? Among 10 prizes

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證高級PHP講師

reply all(1)
阿神

Every station understands what you mean, but the easier way to draw immediately is:

1.從0到100隨即生成一個整數(shù)
2.設(shè)置中獎范圍 比如10%的中獎率 那么1到10是中獎數(shù)字
3.然后根據(jù)抽中后的數(shù)字判斷是幾等獎

If you feel it is not safe, you can also increase the range, such as 0 to 10,000, and then set the winning range, etc.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template