I have this array (below) that I need to iterate through to produce a table. The problem is that the heading of the table is actually buried deep in the array and I can’t seem to wrap my head around how to iterate through it.
Array:
[code]Zone 1Array
(
[rat] => Array
(
[0] => Array
(
[id] => 62
[z_id] => 7
[o_name] => SCU 29
[history_table] => HUB65CRAC1RAT
[type] => rat
)
[1] => Array
(
[id] => 64
[z_id] => 7
[o_name] => SCU 30
[history_table] => HUB65CRAC2RAT
[type] => rat
)
)
[sat] => Array
(
[0] => Array
(
[id] => 63
[z_id] => 7
[o_name] => SCU 29
[history_table] => HUB65CRAC1SAT
[type] => sat
)
[1] => Array
(
[id] => 65
[z_id] => 7
[o_name] => SCU 30
[history_table] => HUB65CRAC2SAT
[type] => sat
)
)
[/code]
I need to produce a table like this:
SCU 29
[table] [tr] [td] [/td] [td]Zone ID[/td][td]Table[/td][/tr]
[tr] [td]RAT[/td] [td]7[/td][td]HUB65CRAC1RAT[/td][/tr]
[tr] [td]SAT[/td] [td]7[/td][td]HUB65CRAC1SAT[/td][/tr] [/table]
[b]
SCU 30
[/b][table] [tr] [td] [/td] [td]Zone ID[/td][td]Table[/td][/tr]
[tr] [td]RAT[/td] [td]7[/td][td]HUB65CRAC2RAT[/td][/tr]
[tr] [td]SAT[/td] [td]7[/td][td]HUB65CRAC2SAT[/td][/tr] [/table]