可能重复:
如何获取数组中的最后一个键?
我有一个数组
$arr=Array
(
[0] = Array
(
[groupid] = 1
[groupname] = Oxy
[members] = Array
(
[0] = Array
(
[id] = 9
[name] => Anith
)
[1] = Array
(
[id] = 12
[name] = sanjay
)
[3] =Array
(
[id] = 13
[name] = Sooraj K
)
)
) )
这里$arr[0]['members'][2]
未设置。我想找到$arr[0]['members']
这里的最后一个索引是 3 ..我怎样才能找到这个最后一个索引