Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Pętla grupowanie wyników
msm
post
Post #1





Grupa: Zarejestrowani
Postów: 39
Pomógł: 2
Dołączył: 15.07.2010

Ostrzeżenie: (0%)
-----


Witam, mam taką tablicę
  1. Array ( [0] => Array ( [order_id] => 33 [order_item_name] => Nazwa 1 [product_id] => 17 [product_attribute] => 3 ) [1] => Array ( [order_id] => 37 [order_item_name] => Nazwa 2 [product_id] => 17 [product_attribute] => 18 ) [2] => Array ( [order_id] => 34 [order_item_name] => Nazwa 3 [product_id] => 17 [product_attribute] => 4 ) [3] => Array ( [order_id] => 36 [order_item_name] => Nazwa 4 [product_id] => 16 [product_attribute] => 1 ) )

Chciałbym wyświetlić wynik pogrupowany wg [product_id]

Produkt 17 | ilość 3 | Suma [product_attribute]
Produkt 16 | ilość 1 | | Suma [product_attribute]

Próbuje z foreach i brak efektów.

msm
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.09.2025 - 23:36