OK, I think I should have elaborated my probelm a little bit more, so here goes:
I have an array as such:
Array
(
[merchantid1] => KrisCo-7008651
[merchantprice1] => 1.99
[merchantid2] => KrisCo-2714258
[merchantprice2] => 2.99
[merchantid3] => KrisCo-2714258
[merchantprice3] => 5
)
What I need is to figure out a way to loop through the array and add the price values together where the merchant values are the same within the array.
So in the example above, the final outcome would be something like:
$merchant1 = "KrisCo-7008651";
$merchant1_total_price = "1.99";
$merchant2 = "KrisCo-2714258";
$merchant_total_price = "7.99";
How can I achieve this?
Many Thanks