here is my array
Array
(
[0] => 31
[1] => 36
[2] => 41
)
the 31,36, and 41 are id’s of a record. the elements in this array can be from anywhere of 1 element to 10+ elements. the table structure looks something like this (shortened-version)
tbl_cart
---------
id (auto-incremented)
product_name
price
what i’m trying to figure out is how can i do a query that will grab the id’s listen in a dynamically created array then accumulate the price for each respected id and display the output?
thanks, let me know if this doesnt make sense.
you want to sum the prices for the ids in your list right?