我有以下元件車會話:PHP返回總有相同的元件在二維陣列會話
的print_r($ _ SESSION [ '購物']);
Array
(
[0] => Array
(
[p_name] => X-Dot Motorbike Helmet G88 + Bogo Visor (Test)
[p_code] => 2102649
[p_id] => 12332
[p_price] => 1.60
[p_seller] => 230002
[p_alt-variation-1] => Red
[p_alt-variation-2] => L - 1.60-36
[p_qty] => 1
)
[1] => Array
(
[p_name] => Salt and Lemon Candy (20 Packs/Carton)
[p_code] => 3443268
[p_id] => 11654
[p_price] => 1.20
[p_seller] => 230002
[p_qty] => 1
)
[2] => Array
(
[p_name] => Romoss Rolink Hybrid Premium Cable
[p_code] => TEST421
[p_id] => 10670
[p_price] => 13.90
[p_seller] => 230001
[p_qty] => 1
)
)
可以看出在[p_seller]
,我想組相同p_seller值,並返回號碼:
return 2 through the array (230002), and return 1 through the array (230001)
我該怎麼辦呢?
p_seller具有'** 230001 **'值,或者您試圖將這些數字加粗? –
只有粗體,刪除 –
*號碼*不是*總共具有相同的元素* – RomanPerekhrest