Let's say, I have something like below (quantities can be variable):
Product Color XS S M L XL
A RED 100 200 200 200 100
A WHITE 50 100 200 100 20
B RED 50 200 200 100 50
B WHITE 100 200 300 200 100
If I saved them into array such as like this:
$product_array[] =
array('product' => 'A', 'color' => 'RED',
'XS' => 100, 'S' => 200,
'M' => 200, 'L' => 200,
'XL' =>100);
What is the easiest way to find size quantity and update their given Product id and color? Let's say, (A, RED) sold XS size 10 qty?
$products['A']['RED']['XL'](really though, it would be simplest in a database)