有数组[['type'=>'=','field'=>'n1.createtime']['type'=>'like','name'=>'小明']],删除field等于n1.createtime的数组,用PHP写,尽量简洁
时间: 2024-01-12 18:03:55 浏览: 28
数组数据删除
您好,以下是解答:
```php
$array = [
['type'=>'=','field'=>'n1.createtime'],
['type'=>'like','name'=>'小明']
];
foreach ($array as $key => $value) {
if ($value['field'] == 'n1.createtime') {
unset($array[$key]);
}
}
```
希望可以帮到您!
阅读全文