Hello!
I have an array (stock, group)
Array
(
[0] => Array
(
[1] => FG 368.016 // stock
[2] => group1 // group
)
[1] => Array
(
[1] => FG 368.018
[2] => group2
)
[2] => Array
(
[1] => PM F 860.014
[2] => groupPM
)
)
And database table that has 2 fields (stock, group).
All 'group' in table has empty value.
All 'stock' in table has same value(stock) as array above, but not in the same order.
What script needs to be able to fill the table with a 'group' of the array above
so that the 'stock' of the array is identical to the 'stock' of table?
SELECT stock FROM table
$stocks = array
(
0 => 'FG 368.016',
1 => 'FG 368.018',
2 => 'PM F 860.014',
4 => 'FG SG 847.014',
);
Thank you!