Re: Creating single row for multiple items.
| From: | Ashley Sheridan | Date: | Tue, 09 Sep 2008 23:38:04 +0000 |
| Subject: | Re: Creating single row for multiple items. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279759@lists.php.net to get a copy of this message | ||
I'm assuming because this is part of a shopping cart, so he would have
to put the data into the database only to retrieve it again, which is a
little bit of a waste.
As for how to do it, I'd look through the arrays you have and use
associative arrays (where the order number is the key of the array
element) and set the price if the array element is just being set (use
the isset() function for this) and increment it if it already exists.
Ash
www.ashleysheridan.co.uk