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 any other character for my db work
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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).