Generally, for natural numbers a>0 and b>0
if(mt_rand(1,$a+$b)>$a){
echo 'b';
} else {
echo 'a';
}
2
solved Percentage for event to happen PHP [closed]
Generally, for natural numbers a>0 and b>0
if(mt_rand(1,$a+$b)>$a){
echo 'b';
} else {
echo 'a';
}
2
solved Percentage for event to happen PHP [closed]