Good day,
I would appreciate your help with my question:
I have an array:
For example - I have got 3 items in this array:
My question is: How can I go thought this array and compare values - searching for those, who have the same 'product_type' and 'product_color' and then to create new array with those values merged and their 'quantity' added.
this is what I would get in result using my example:
Can anybody help me please?
thank you.
I would appreciate your help with my question:
I have an array:
Code:
array(product_type, product_color, quantity);
Code:
array('bmw', 'green', '4'); array('audi', 'red', '6'); array('bmw', 'green', '7');
this is what I would get in result using my example:
Code:
array('bmw', 'green', '11'); array('audi', 'red', '6');
Can anybody help me please?
thank you.
Comment