如何破灭数组索引? [英] How to implode array indexes?
本文介绍了如何破灭数组索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能破灭数组的索引?一个函数返回我一个数组,我需要的是该数组的索引,所以我希望破灭只有逗号或任何其他字符inexes我的分贝的工作是什么
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
推荐答案
您的意思是这样...
You mean something like this...
implode(',', array_keys($some_arr));
...对吧? )下面是文档 array_keys
;总之,当一个参数(数组)调用,这个函数只是返回它的所有按键(如数组)。
... 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).
这篇关于如何破灭数组索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文