J'ai un tableau:PHP Grouper un tableau
Array
(
[customer] => One
[itemno] => Yellow Ribbon
[price] => 1,2
)
Array
(
[customer] => One
[itemno] => Blue Band
[price] => 0,5
)
Array
(
[customer] => Two
[itemno] => Red Tape
[price] => 2,0
)
Et je veux groupe par le client comme ceci:
Array
(
[One] => Array (
[itemno] => Yellow Ribbon
[price] => 1,2
)
[itemno] => Blue Band
[price] => 0,5
)
[Two] => Array (
[itemno] => Red Tape
[price] => 2,0
)
)
Comment puis-je y arriver?
liée à (pas un doublon de) http://stackoverflow.com/questions/3487380/php-array -push-not-the-right-function-what-to-use – VolkerK