我在 php 中有以下数组:
Array
(
[0] => Array
(
[city] => London
[institute_count_per_city] => 10
)
[1] => Array
(
[city] => Leeds
[institute_count_per_city] => 10
)
[2] => Array
(
[city] => Edinburgh
[institute_count_per_city] => 10
)
[3] => Array
(
[city] => GrandTotal
[institute_count_per_city] => 30
)
)
现在,最后一个子数组将始终具有常量 key=>value ([city]=>GrandTotal)。我想为 [city]=>GrandTotal 获取 [institute_count_per_city] 的值。
实现这一目标的有效方法是什么。