Multidimensional Array into an Html table, help!


Posted on 16th Feb 2014 07:03 pm 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

111 Like 23 Dislike
Previous php-forum Next php-forum
Other php-forum

Storing Values taken from a DB...
Using this code it will generate a short list from my database

<?php
mysql_connect

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but

Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

Help with some dates
I have a list of dates in an array:

$mondays = array(
strtotime("October 12, 2009

Help to integrate whois Domain Details to website
Hi,

can i know is their any php script r methods to add domain details to my website.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash