$obj=new zqf();
第一個參數(shù)是紅包總額,第二個人參數(shù)紅包數(shù)量,第三個參數(shù)默認代表拼手氣紅包,設(shè)置為1的話為普通紅包
拼手氣紅包
$hongb= $obj->hongbao(10,8);或者$hongb= $obj->hongbao(10,8,0);返回數(shù)組為Array ( [0] => 1.33 [1] => 1.02 [2] => 1.28 [3] => 0.44 [4] => 1.37 [5] => 0.81 [6] => 1.81 [7] => 1.94 )
普通紅包,每個人數(shù)額一樣設(shè)置第三個參數(shù)
$hongb= $obj->hongbao(10,8,1);返回數(shù)組為Array ( [0] => 1.25 [1] => 1.25 [2] => 1.25 [3] => 1.25 [4] => 1.25 [5] => 1.25 [6] => 1.25 [7] => 1.25 )
var_dump($hongb);
更多建議: