How to implode array indexes?

后端 未结 1 673
暖寄归人
暖寄归人 2021-01-13 12:37

Is it possible to implode array\'s indexes? A function is returning me an array and what I need are the indexes of that array so I want to implode only inexes with comma or

相关标签:
1条回答
  • 2021-01-13 13:11

    You mean something like this...

    implode(',', array_keys($some_arr));
    

    ... right? ) Here's documentation for array_keys; in short, when called with a single argument (an array), this function just returns all its keys (as array).

    0 讨论(0)
提交回复
热议问题