= 0){ if($count - ($i + ($i * $double)) >= 0){ $ans = $i; } else { $ans = 0; } } else { $ans = 0; } } echo $ans;