国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

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
565

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)證高級(jí)PHP講師

reply all(1)
阿神

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

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

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