<html>
<head>
<title>Menu</title>
</head>
<body>
<h3>Restaurant meal and prices</h3>
<?php
$PastaDPina = 13;
$pepsi = 8;
$cake = 4;
$entree = 11.2;
$tax = 0.08;
$tip = 0.15;
echo "PastaDPina: $PastaDPina$<br>";
echo "Pepsi Cola: $pepsi$<br>";
echo "Cake: $cake$<br>";
echo "Entree: $entree$<br>";
$total=$PastaDPina+$pepsi+$cake+$entree;
echo "<hr>";
echo "Sub-total: <b>".number_format($total,2)."</b><br>";
$salestax = number_format($total*$tax,2);
echo "Sales Tax: <b>".$salestax."</b><br>";
$custtip = ($total+$salestax)*$tip;
echo "Sales Tax: <b>".number_format($custtip,2)."</b><br>";
echo "Grand Total: <b>".number_format($total+$salestax+$custtip,2)."</b><br>";
?>
</body>
</html>
|