How to index array indices?

Is it possible to implement array indices? The function returns me an array and what I need is the indices of this array, so I want to explode only indices with a comma or any other character for my work db

+4
source share
1 answer

You mean something like this ...

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

... right? ) Here is the documentation for array_keys ; In short, when called with a single argument (array), this function simply returns all its keys (as an array).

+14
source

Source: https://habr.com/ru/post/1434956/


All Articles