$random == rand(0,100); if ($random >= 90) { //A } elseif ($random <= $chance) { //B } else { //C }