у меня есть файл с категориями от facebook такого типа:
<?php
return [
'PERSON' => [
"name" => "Public figure",
"api_enum" => "PERSON",
"fb_page_categories" => [
[
"name" => "Concert Band",
"api_enum" => "CONCERT_BAND",
"id" => "1006597106868677",
],
[
"name" => "Talent Manager",
"api_enum" => "TALENT_MANAGER",
"id" => "554779588915685",
],
[
"name" => "Media Critic",
"fb_page_categories" => [
[
"name" => "Video Game Critic",
"api_enum" => "VIDEO_GAME_CRITIC",
"id" => "277716044221264",
],
[
"name" => "Music Critic",
"api_enum" => "MUSIC_CRITIC",
"id" => "410944317153894",
],
[
"name" => "Movie Critic",
"api_enum" => "MOVIE_CRITIC",
"id" => "398143905120828",
],
],
"api_enum" => "MEDIA_CRITIC",
"id" => "628522311538760",
],
я подключаю файл через php foreach
<?php foreach($facebook_pages as $key => $value): ?>
и вывожу первые категории так:
<div id="page_subtype_<?= $key ?>" class="form-group">
<label for="settings_page_subcategory_<?= $key ?>"><i class="fa fa-fw fa-user fa-sm mr-1"></i> Subcategory</label>
<select id="settings_page_subcategory_<?= $key ?>" name="page_category" class="custom-select">
<?php foreach($facebook_pages[$key]['fb_page_categories'] as $keys => $value): ?>
<option value="<?= $value['api_enum']; ?>" <?= $data->link->settings->page_category == $keys ? 'selected="selected"' : null?>><?= $value['name']; ?></option>
<?php endforeach ?>
</select>
</div>
как мне вывести правильно подкатегории?
тоесть мне надо select list с options
'PERSON' => "fb_page_categories" ["api_enum" => "MEDIA_CRITIC",] "fb_page_categories" =>