Math question
| From: | Tom Ray [Lists] | Date: | Tue, 27 May 2003 03:06:02 +0000 |
| Subject: | Math question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149037@lists.php.net to get a copy of this message | ||
I'm working on a little shopping cart script and when I get to the checkout portion I show what is in the cart and for each item I show the quanity, price per unit then I show the total cost for that item. So basically it looks like $total = $qty * $price My question is how do I add the value of $total to give the over total of the order? Since there may be one or more different items in the cart I can't seem to pin down the math that will allow for the changing amount of items in the cart. since there may be just one $total variable or 5.
I hope I'm clear enough on this, any ideas or thoughts would be welcome and appreciated.
Thanks!