Comment regrouper les mêmes valeurs dans un tableau multidimention?Comment regrouper les mêmes valeurs dans un tableau multidimention?
Je veux que ce
array(
array('a' => 1, 'b' => 'hello'),
array('a' => 1, 'b' => 'world'),
array('a' => 2, 'b' => 'you')
)
pour devenir
array(
array(
array('a' => 1, 'b' => 'hello'),
array('a' => 1, 'b' => 'world')
),
array('a' => 2, 'b' => 'you')
)
Quelque chose comme ceci: http://reference.wolfram.com/mathematica/ref/Gather.html? – Artefacto
Je n'ai pas compris grand-chose. – Codler