RE: [PHP] Add Up Prices in Array

From: Date: Sun, 01 Jun 2003 08:02:28 +0000
Subject: RE: [PHP] Add Up Prices in Array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149714@lists.php.net to get a copy of this message
Right... I never thought of this. But can I use this if what I'm trying to get the (price * quantity). -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com] Sent: Sunday, June 01, 2003 12:43 AM To: Ralph Cc: PHP General Mailing List Subject: Re: [PHP] Add Up Prices in Array If they are coming out of your database, why not get your database to do it for you by calling SUM() in your query? On Sun, 1 Jun 2003, Ralph wrote: > I'm querying prices off a database then storing these in an array, I > want to add these up to get the grand total, how would I go about adding > up all the prices stored in the array? > > Thanks in advance. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#149714) next »