<cfset total = 0> <cfloop> <cfset total = total + price> </cfloop>
Mike ----- Original Message ----- From: "Paul Campano" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, June 30, 2003 11:55 AM Subject: CFLOOP question > I am looping through items in a shopping cart and need to add up the price > of each item to get a total price. How would I do this? I thought about > setting a variable "price" per iteration through the loop, but that just > gets overwritten each time. Thanks. > > Paul Campano > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4