说我有以下内容:
Array(
[0] => Array
(
[id] => 1
[item] => first item
)
[1] => Array
(
[id] => 3
[item] => second item
)
[2] => Array
(
[id] => 5
[item] => third item
)
)
我想用id
= 5 删除项目。我知道我可以遍历数组并取消设置,但我希望有一个更直接/更有效的解决方案。