I am trying to output an array as an html table, a sample of the array is..
Array
(
[18] => Array
(
[colour] => red
[size] => large
[age] => 220
)
[19] => Array
(
[colour] => yellow
[size] => small
[age] => 20
)
[12] => Array
(
[colour] => brown
[size] => large
[age] => 2
)
)
I am ok with doing a foreach for a simple array but does anyone have an example showing this being converted into a table for this type of array?
<table><tr><td>I'm a table!</td></tr></table>. (Do at least make an effort to solve this problem, it helps clarify your intent and shows you're committed to solving it.)<tbody>)PHP array to tableyielded me about 3,450,000 results"I am ok with doing a foreach"- Then have you tried?"being converted into a table for this type of array"- And what 'type of array' is this? Is there some reason a foreach wouldn't iterate over this array? I guess it's not really clear to me where you're actually stuck here.