Multidimensional Array into an Html table, help!

Posted on 16th Feb 2014 by admin

Hello all, I am new to HTML/PHP so any help would be great.

I have a multidimensional array filled with values that I am trying to output into an html table.

This works (outputs value of array):
Code: echo $table[0][0];

This does not work (outputs "Array[0]" instead of the actual value within the table):
Code: echo "<table border = 1>n";
echo "<td>Col 1</td><td>Col 2</td><td>Col 3</td>";
echo "</tr>n";
echo "<td>$table[0][0]</td><td>$table[0][0]</td><td>$table[0][0]</td>";
echo "</table>n";


I was going to use a couple of loops to output the array into the table however the way I have above is not working and really screwing me up. Does anyone have a solution? Thanks

Other forums