Ciao a tutti,
mi aiutate a impostare il foreach per stampare tutti i title contenuti nell'array [Item] ?
Ho provato ma ad un certo punto mi sono perso:
[PHP]
foreach ($array as $vals) {
foreach ($vals['ItemComponentsItemType'] as $itemComponentsItemType) {
foreach ($itemComponentsItemType['ItemType'] as $itemType) {
pr($itemType);
// foreach ($itemType['ItemType']['Item'] as $item) {
Codice PHP:
Array
(
[0] => Array
(
[ItemComponent] => Array
(
[id] => 1
[title] => News
[active] => 1
)
[ItemComponentsItemType] => Array
(
[0] => Array
(
[id] => 16
[item_component_id] => 1
[item_type_id] => 3
[ItemType] => Array
(
[id] => 3
[active] => 1
[title] => Page + News
[alias] => PageNews
[item_render_id] => 4
[order] => 0
[image] =>
[image_dir] =>
[note] =>
[parent_id] =>
[lft] => 5
[rght] => 6
[find_limit] => 20
[find_order] => ASC
[item_find_order_id] => 2
[Item] => Array
(
[0] => Array
(
[title] => FAQ
[slug] => faq
[id] => 16
[parent_id] => 106
[structure] => 1
[item_type_id] => 3
)
[1] => Array
(
[title] => Portfolio
[id] => 27
[parent_id] => 106
[structure] => 1
[item_type_id] => 3
)
[2] => Array
(
[title] => Viaggi
[id] => 92
[parent_id] => 106
[structure] => 1
[item_type_id] => 3
)
[3] => Array
(
[title] => Regole del sito
[slug] => rules
[id] => 107
[parent_id] => 106
[structure] => 1
[item_type_id] => 3
)
)
)
)
)
)
)