Home >Backend Development >PHP Tutorial >怎么删除多维数组中的一组数组
如何删除多维数组中的一组数组
<?php<br />'Ftps' => <br /> array (<br /> 0 => <br /> array (<br /> 'id' => '1',<br /> 'uid' => '1',<br /> 'order_id' => '0',<br /> 'sid' => '2',<br /> 'name' => 'admin123',<br /> 'master' => '0'<br /> ),<br /> 1 => <br /> array (<br /> 'id' => '2',<br /> 'uid' => '2',<br /> 'order_id' => '0',<br /> 'sid' => '2',<br /> 'name' => 'admin350',<br /> 'master' => '1'<br /> ),<br /> 2 => <br /> array (<br /> 'id' => '3',<br /> 'uid' => '3',<br /> 'order_id' => '0',<br /> 'sid' => '2',<br /> 'name' => 'admin150',<br /> 'master' => '0'<br /> ),<br /> )<br />);<br /><br />//我想,把 'master' => '1' 这一组数组删除 ,循环出来后<br />foreach($Ftps AS $key=>$rs){<br /> <br />}<br />//////////////////////////////////////////////////////////////////////////////<br />'Ftps' => <br /> array (<br /> 0 => <br /> array (<br /> 'id' => '1',<br /> 'uid' => '1',<br /> 'order_id' => '0',<br /> 'sid' => '2',<br /> 'name' => 'admin123',<br /> 'master' => '0'<br /> ),<br /> 1 => <br /> array (<br /> 'id' => '3',<br /> 'uid' => '3',<br /> 'order_id' => '0',<br /> 'sid' => '2',<br /> 'name' => 'admin150',<br /> 'master' => '0'<br /> ),<br /> )<br />);<br />?>