可能重复:
Is there a PHP function to remove any/all key/value pairs that have a certain value from an array?
Remove zero values from a PHP arraycreate_function在PHP
我有一个阵列是这样的。
[notify_emp] => Array
(
[224] => 0
[228] => 0
[232] => 1
[250] => 1
[350] => 1
)
我只想从数组这些密钥已经值设置为1,需要删除具有值0键我 怎么能做到这一点使用create_function在PHP?或者有没有其他方法可以执行此操作?
我不明白为什么要使用'create_function'在这里。 –