J'ai le tableau suivant :
Code : Tout sélectionner
Array
(
[0] => Array
(
[achat_article_id] => 1
[achat_article_name] => pack 1
[achat_price] => 150
[achat_quantity] => 1
[achat_total] => 150
)
[1] => Array
(
[achat_article_id] => 2
[achat_article_name] => pack 2
[achat_price] => 50
[achat_quantity] => 1
[achat_total] => 50
)
)
Mais un array_sum($achats["achat_quantity"]) ne me retourne rien.
Dois-je forcément passer par une boucle, qui va additionner une par une les valeurs de $achats["achat_quantity"] à chaque tour de boucle ?