Это вложенный массив, который я получил из своей базы данных,
Array
(
[0] => Array
(
[Field] => blc_id
[Type] => int(10) unsigned
[Null] => NO
[Key] => PRI
[Default] =>
[Extra] => auto_increment
)
[1] => Array
(
[Field] => blc_email
[Type] => varchar(255)
[Null] => YES
[Key] =>
[Default] =>
[Extra] =>
)
[2] => Array
(
[Field] => cat_id
[Type] => varchar(255)
[Null] => YES
[Key] =>
[Default] =>
[Extra] =>
)
[3] => Array
(
[Field] => blc_created
[Type] => timestamp
[Null] => NO
[Key] =>
[Default] => 0000-00-00 00:00:00
[Extra] =>
)
[4] => Array
(
[Field] => blc_updated
[Type] => timestamp
[Null] => NO
[Key] =>
[Default] => CURRENT_TIMESTAMP
[Extra] => on update CURRENT_TIMESTAMP
)
)
Как я могу использовать цикл foreach для получения результата ниже,
Array
(
[0] => blc_id
[1] => blc_email
[2] => cat_id
[3] => blc_created
[4] => blc_updated
)
Вот мой код, но, конечно, он не возвращает результат правильно,
foreach($items as $outer_key => $array)
{
foreach($array as $inner_key => $value)
{
$field_name[] = $value;
}
}
Спасибо.