【发布时间】:2015-11-30 11:41:52
【问题描述】:
我有这个数组调用$aSumGame:
Array
(
[682] => Array
(
[nature] => 682
[totalGames] => 3
[category] => super
)
[707] => Array
(
[nature] => 707
[totalGames] => 2
[category] => event
)
[728] => Array
(
[nature] => 728
[totalGames] => 2
[category] => event
)
)
现在我想获取列数最大的数组totalGames,在这种情况下我想获取键为682的数组。我试过这样$aMaxGame= max($aSumGame['totalGames']);,但没有用。你能帮帮我吗?
【问题讨论】:
-
如果有 2 个 key 包含 max return both?
标签: php arrays multidimensional-array php-5.3