嗨,我有这个数组进来:
$myRegionData =
array (
[0] => stdClass Object
(
[howmuch] => 1
[country] => ID
[state] => JAWA BARAT
)
[1] => stdClass Object
(
[howmuch] => 1
[country] => RO
[state] => BUCURESTI
)
[2] => stdClass Object
(
[howmuch] => 2
[country] => US
[state] => CALIFORNIA
)
[3] => stdClass Object
(
[howmuch] => 1
[country] => US
[state] => TEXAS
)
)
我试图将数组输出分组
ID
JAWA BARAT (1)
RO
BUCURESTI (1)
US
CALIFORNIA (2)
TEXAS (1)
我已经尝试过键值关联、i Loops 等。我似乎可以在显示中结合美国各州。
任何建议将不胜感激