php實現一個發紅包功能,100元發給8人

/** * 發紅包 * */ function red($total, $num) { $total *= 100; $tmp = []; $arr = []; for (; $num > 1; $num--) { $p = mt_rand(1, $total); while (in_array($p, $tmp) || $p ==
相關文章
相關標籤/搜索