Calculating a total price

From: Date: Thu, 15 May 2003 16:09:09 +0000
Subject: Calculating a total price
Groups: php.general 
Request: Send a blank email to php-general+get-147722@lists.php.net to get a copy of this message
I need some clear eyes :) I have a site in which a customer can select an item and then purchase it. It is not a shopping cart - just a way for marketing departments to place orders for shirts, pens, golf balls, etc. I have a table that holds the price of each item and also a table that holds the quantity they want. Calculating the individual sale items I do this: $order_total = ($prod_qty * $prod_price); But I need to come up with a total price at the end of the transaction, would a foreach array be my best bet? Thanks in advance...... -Scott

« previous php.general (#147722) next »