Hi guys, I've got this far with a bit of code:
HTML Code:
<td><?php echo $Row03['QtyOrdered']; ?></td>
<td><?php echo $Row03['Brand']; ?> <?php echo $Row03['ItemDescription']; ?></td>
<td><?php echo $Row03['Price']; ?></td>
<td><?php echo number_format ($Row03['QtyOrdered'] * $Row03['Price'],2); ?></td>
So, the user might see something like this:
Qty: Item: Cost: Totals:
2 Nescafe Classic 50g 2.50 5.00
1 McVities Hob Nobs 250g 2.33 2.33
Now, the above is embedded within a while loop pulling orders from a database but it only occured to me today, hey - what if the client select 2 of this and 1 of that. I need to total up these items.
So, as you can see, I can total up the rows, but I'm stuck on how I can total up the column "Totals"
Any help on this would be appreciated because I think it's my final stumbling block.
|