Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-11-2009, 05:16 AM   PM User | #1
chiathoong
New to the CF scene

 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
chiathoong is an unknown quantity at this point
table display by database array

How do I display a table which get database from mysql to display in column and row data and it related to each other.
eg:

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?
chiathoong is offline   Reply With Quote
Old 03-11-2009, 09:42 AM   PM User | #2
mathew edison
New Coder

 
Join Date: Nov 2007
Posts: 38
Thanks: 5
Thanked 0 Times in 0 Posts
mathew edison is an unknown quantity at this point
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.
mathew edison is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:21 AM.


Advertisement
Log in to turn off these ads.