I would like to compare lists with others in order to merge if their numbers (id_article) are the same. In my example, I would like to obtain this final array list :
*Final *
Array
(
[0] => Array
(
[id_article] => 1
[quantite] => 5
)
[1] => Array
(
[id_article] => 3
[quantite] => 1
)
}
INITIAL
Array
(
[0] => Array
(
[id_article] => 1
[quantite] => 2
)
[1] => Array
(
[id_article] => 1
[quantite] => 3
)
[2] => Array
(
[id_article] => 3
[quantite] => 1
)
)
I tried with next() and current() but didn't work in this case.
Thanks in advance for help, advice or others examples.