Skip to content

Instantly share code, notes, and snippets.

Avatar

sushengbuhuo sushengbuhuo

View GitHub Profile
View prize.php
function get_rand($proArr) {
$res = '';
//改了数组的总概率精度
$proSum = array_sum($proArr);
//概率数组循环
foreach ($proArr as $k => $v) {
$randNum = mt_rand(1, $proSum);