Calculating Discount
$price = 200;
$qty = 10;
echo "Original price is $price
";
if ($qty =10) {
$discount=10;
}elseif ($qty <=20) {
$discount=15;
}elseif (qty <=30) {
$discount=20;
}elseif($qty <=40){
$discount=25;
}
echo "Discount is $discount percent
";
echo "Price after discount is ", (($price * (100 - $discount)/ 100)), "
";
?>