我需要从字符串中删除数组中的某个键。如何从字符串中删除数组元素
字符串是translations.fr
阵列是
[
...,
translations => [
fr => [
...
],
es => [
...
]
],
...,
]
结果必然是:
[
...,
translations => [
es => [
...
]
],
...,
]
我认为,使用exlpode
和unset
是很好的方式。
你能帮我吗?感谢的
使用PHP未设置()方法为 –
'未设置($ translation_arr [ 'FR']);'会工作。 –
试试这个,https://stackoverflow.com/questions/369602/delete-an-element-from-an-array – dadan