怎么删除多维数组中的一组数组
程序员文章站
2024-02-18 22:10:04
...
如何删除多维数组中的一组数组
------解决方案--------------------
'Ftps' =>
array (
0 =>
array (
'id' => '1',
'uid' => '1',
'order_id' => '0',
'sid' => '2',
'name' => 'admin123',
'master' => '0'
),
1 =>
array (
'id' => '2',
'uid' => '2',
'order_id' => '0',
'sid' => '2',
'name' => 'admin350',
'master' => '1'
),
2 =>
array (
'id' => '3',
'uid' => '3',
'order_id' => '0',
'sid' => '2',
'name' => 'admin150',
'master' => '0'
),
)
);
//我想,把 'master' => '1' 这一组数组删除 ,循环出来后
foreach($Ftps AS $key=>$rs){
}
//////////////////////////////////////////////////////////////////////////////
'Ftps' =>
array (
0 =>
array (
'id' => '1',
'uid' => '1',
'order_id' => '0',
'sid' => '2',
'name' => 'admin123',
'master' => '0'
),
1 =>
array (
'id' => '3',
'uid' => '3',
'order_id' => '0',
'sid' => '2',
'name' => 'admin150',
'master' => '0'
),
)
);
?>
------解决方案--------------------