Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    New Coder
    Join Date
    Nov 2007
    Posts
    41
    Thanks
    5
    Thanked 1 Time in 1 Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •