サブ要素をCakePHP配列から簡単に削除する方法はありますか?foreach ($junta)
? 私はdiverses要素とこの配列$junta
を持っていると私は[password] => 3d0f93c607cfe638f9421d4af49a3455
複数の配列から要素を削除するcakephp
使用して、このコードを削除したい:
$index = array_search('password',$junta);
if($index !== FALSE){
unset($junta[$index]); }
をと動作しません。 $junta
の
値:
Array
(
[junta] => Array
(
[Council] => Array
(
[id] => 21
[descripcion] => esta es una prueba 7
[version] =>
[imagen] => Cuadernillo de higiene y seguridad Industrial.pdf
[archivo] => 21
[director] =>
[fecha] => 2016-04-07
[user_id] => 1
)
[User] => Array
(
[id] => 1
[username] => jflores
[password] => 3d0f93c607cfe638f9421d4af49a
[nombres] => Antonio
[Apellido_P] => flores lara
[Apellido_M] =>
[created] => 2016-03-13 01:57:37
[email] => [email protected]
[role] => king
[modified] => 2016-03-13 02:21:39
[status] => 1
)
)
[consejeros] => Array
(
[0] => Array
(
[CouncilorsCouncil] => Array
(
[councilor_id] => 2
[council_id] => 21
)
)
)
)