1.10.php

Using double quotation marks

Total = 3,778.43

Using single quotation marks

Total = $total
# Script 1.10
//Set the variables
$quantity = 30; //Buying 30 widgets
$price = 119.95;
$taxrate = .05; // 5% sales tax

//Calculate the total
$total = $quantity * $price;
$total = $total + ($total * $taxrate);
//Add tax

//Format the total
$total = number_format($total, 2);


echo "<h3>Using double quotation marks</h3>";
echo "Total = $total";

echo '<h3>Using single quotation marks</h3>';
echo 'Total = $total';