You will need to use different data types to represent different pieces of information on your website Strings are used to represent customer names, titles, descriptions, etc. Integers are used to represent things like days, months and years, as well as quantities Float is used to represent prices and large numbers Boolean is used to store if something is TRUE or FALSE
Assign 3 variables for quantity and 3 for price $qty1 = 1; $qty2 = 2; $qty3 = 3; $price1 = 1.10; $price2 = 2.20; $price3 = 3.30;
Use PHP in the 3 <input> tags to echo the quantity in the "value" attribute <input type="text" value="<?php echo $qty1; ?>" name="qty[]" class="s0" size="2" />
Locate the 3 <td> tags which represent price and use printf() to echo the price <td><?php printf("$ %8.2f", $priceN); ?></td>
Use printf() in the 3 <td> tags to calculate the extended price <td><?php printf("$ %8.2f", $qtyN * $priceN); ?></td>
Assign a variable which represents the total for quantity x price for all three items $total = ($qty1 * $price1) + ($qty2 * $price2) + ($qty3 * $price3);
Use printf() to display the total <?php printf("$ %10.2f", $total); ?>