我有一个如下所示的数组。我想找到“diff”索引中数字最小的数组。因此,在这种情况下,我希望返回数组[7]。我只需要数组编号(即7),不需要任何其他信息。
我知道可以使用array_column轻松找到最低数字,但如何同时返回7的整个数组索引?
我知道可以使用array_column轻松找到最低数字,但如何同时返回7的整个数组索引?
[1] => Array
(
[qb] => 7
[rb] => 58
[wr] => 91
[te] => 3
[def] => 11
[diff] => 136
)
[2] => Array
(
[qb] => 21
[rb] => 96
[wr] => 102
[te] => 48
[def] => 15
[diff] => 240
)
[3] => Array
(
[qb] => 23
[rb] => 86
[wr] => 216
[te] => 6
[def] => 32
[diff] => 287
)
[4] => Array
(
[qb] => 30
[rb] => 51
[wr] => 200
[te] => 14
[def] => 17
[diff] => 266
)
[5] => Array
(
[qb] => 17
[rb] => 118
[wr] => 273
[te] => 14
[def] => 30
[diff] => 380
)
[6] => Array
(
[qb] => 10
[rb] => 112
[wr] => 142
[te] => 16
[def] => 4
[diff] => 264
)
[7] => Array
(
[qb] => 2
[rb] => 50
[wr] => 135
[te] => 9
[def] => 20
[diff] => 104
)
[8] => Array
(
[qb] => 16
[rb] => 68
[wr] => 141
[te] => 12
[def] => 1
[diff] => 224
)