一个不定的多维数组下面有几种类型的情况,怎么获取到第一维的键名呢?

Array
(
[customfield_10012] => Array
(
[0] => test
)

[customfield_10013] => Array
(
[0] => stdClass Object
(
[self] => http://xxx.com/rest/api/2/customFieldOption/10006
[value] => 111
[id] => 10006
)

)

[customfield_10014] => stdClass Object
(
[self] => http://xxx.com/rest/api/2/customFieldOption/10009
[value] => bb
[id] => 10009
)

[customfield_10005] => 0|i0000f:
[customfield_10007] => 非常好
)

就是上面这个数组,我怎么最后得到下面这样的一唯数组的呢?
Array('customfield_10012','customfield_10013','customfield_10014','customfield_10005','customfield_10007');

折腾了我很久,百度查了很久也没什么解决办法,最后在QQ群里,有群友给出了答案,其实就一个函数解决问题。

array_keys($arr)

原文地址:https://www.cnblogs.com/eaglepie/p/12979540.html