この多次元配列を単純な配列に変換する必要があります。
Array
(
[0] => Array
(
[id_zub] => 1
[name] => Backen
)
[1] => Array
(
[id_zub] => 2
[name] => Kochen
)
)
単純な配列:
array(
[id_zub] => 1
[name] => Backen
[id_zub] => 2
[name] => Kochen
)
関数 array_flattern($array){
foreach($array as $key=> $value){
if(is_array($value)){
$this->array_flattern($value);
}
else{
$this->result[$key] = $value;
}
}
}
関数は私にこの結果を与えます:
Array
(
[id_zub] => 2
[name] => Kochen
)