array("id"=>1,"min"=>0,"max"=>90,"chance"=>10), "1"=>array("id"="/> array("id"=>1,"min"=>0,"max"=>90,"chance"=>10), "1"=>array("id"=">
Home > Backend Development > PHP Tutorial > 如何控制概率?思路怎么

如何控制概率?思路怎么

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:44:28
Original
1873 people have browsed it

怎么控制概率?思路如何?
我想这样的,一个转盘分成4块,可是怎么控制他们的概率不一样呢?要怎么写?

想不下去啊。。。。。求指引~chance为概率

<br />$lottery_arr=array(<br />	"0"=>array("id"=>1,"min"=>0,"max"=>90,"chance"=>10),<br />	"1"=>array("id"=>2,"min"=>90,"max"=>180,"chance"=>20),<br />	"2"=>array("id"=>3,"min"=>180,"max"=>270,"chance"=>30),<br />	"3"=>array("id"=>4,"min"=>270,"max"=>360,"chance"=>40),<br />	)<br />
Copy after login



Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template