我正在尝试创建一个从动态多维数组中删除键的函数,我需要给出: p >
removeByIndex(['hello','my','world']);
code> pre>
然后功能需要 要做到这一点: p>
unset($ array ['hello'] ['my'] ['world']);
code> pre> \ n
索引的数量是动态的,例如: p>
removeByIndex(['hello','my']); // Do:unset($ array ['hello'] ['my']);
removeByIndex(['hello']); // Do:unset($ array ['hello']);
code> pre>
我试图使用一些 foreach code>循环,但我没有 找不到解决方案了。 p>
欢迎任何帮助。 p>
div>