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 ==
相关文章
相关标签/搜索