I have following multidimensional array in PHP and want to clean it up but also sum up the fields.
Example:
[UP-IXSZ-RP36] => Array
(
[stueck] => 1
[anzahl] => 1
[stock] => H-11-004
[name] => Coffee Mate Original
)
[PW-KQZA-ROHD] => Array
(
[stueck] => 4
[anzahl] => 1
[stock] => H-14-017
[name] => Trumpf AK
)
[K3-9SV1-MQQO] => Array
(
[stueck] => 5
[anzahl] => 1
[stock] => H-14-017
[name] => Trumpf AK
)
[EN-6BZL-HJIG] => Array
(
[stueck] => 1
[anzahl] => 1
[stock] => B
[name] => Turm Sahne
)
[3M-EEF4-JO4N] => Array
(
[stueck] => 1
[anzahl] => 1
[stock] => H-14-017
[name] => Trumpf AK
)
I want to filter by name and it should then show me following array.
Which SKU he uses is not important.
[UP-IXSZ-RP36] => Array
(
[stueck] => 1
[anzahl] => 1
[stock] => H-11-004
[name] => Coffee Mate Original
)
[PW-KQZA-ROHD] => Array
(
[stueck] => 10
[anzahl] => 1
[stock] => H-14-017
[name] => Trumpf AK
)
[EN-6BZL-HJIG] => Array
(
[stueck] => 1
[anzahl] => 1
[stock] => B
[name] => Turm Sahne
)
Can someone help me with this issue?
Thanks.