View Full Version : table display by database array

03-11-2009, 05:16 AM
How do I display a table which get database from mysql to display in column and row data and it related to each other.

productA productB productC
USA 0 2 1
Australia 3 9 0
Malaysia 0 2 13

the 0,2,1....is display by count from database.

can anyone help me on this?

mathew edison
03-11-2009, 09:42 AM
It's simple. You'd be using HTML tables and PHP loops. For each heading you create a table column with product A, product B, etc. Then for each result you have for a country you loop trough those results using table rows. With that you construct a nice HTML table with your database results.