Formatting Tables

Discussion in 'PHP' started by Jamie, Oct 20, 2017.

  1. Jamie

    Jamie

    Joined:
    Oct 20, 2017
    Messages:
    1
    Likes Received:
    0
    Hi there,
    I have a wordpress custom table, fields are id,category,question,frmname
    what i need to have a layout of

    CAT1 |CAT2 |CAT3 |CAT4 |CAT5
    c1Q1 | c2Q2 | c3Q3 | c4Q2 | c5Q1
    c1Q2 | c2Q3 | c3Q4 | c4Q3 | c5Q2
    c1Q3 | c2Q4 | c3Q5 | c4Q4 | c5Q3
    c1Q4 | c2Q5 | c3Q6 | c4Q5 | c5Q4

    so i have
    global $wpdb;
    $questions = $wpdb->get_results("select * from wp_pods_questions");

    foreach ($questions as $question){
    //Code.....
    //this is where i am unsure how to get it to format correctly......
    }


    any help would be great thanks
     
    Jamie, Oct 20, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. mark
    Replies:
    2
    Views:
    574
  2. Peter Bassett
    Replies:
    3
    Views:
    1,269
    Augustus
    Aug 15, 2003
  3. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    850
  4. markalroberts@gmail.com

    Not using tables for complex formatting

    markalroberts@gmail.com, Jun 4, 2005, in forum: HTML
    Replies:
    1
    Views:
    452
    Travis Newbury
    Jun 4, 2005
  5. Cerebral Believer

    Problems formatting text within tables

    Cerebral Believer, Aug 13, 2006, in forum: HTML
    Replies:
    11
    Views:
    811
    Beauregard T. Shagnasty
    Aug 15, 2006
  6. Chris Brat
    Replies:
    5
    Views:
    994
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  7. tshad
    Replies:
    0
    Views:
    350
    tshad
    Sep 24, 2007
  8. K.

    Formatting html tables

    K., May 27, 2008, in forum: HTML
    Replies:
    3
    Views:
    519
    Roy A.
    May 28, 2008
Loading...