MYSQL/PHP Array fix - 5 min job

Discussion in 'Programming' started by sebastya, Jan 14, 2009.

  1. #1
    I am currently displaying results as rows when I would like them in columns and cannot seem to get them to work in the array.

    need someone to help me! for FREE! will in turn have your link as my sig for a month!

    regards,
    seb
     
    sebastya, Jan 14, 2009 IP
  2. vinayendra

    vinayendra Active Member

    Messages:
    262
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    let me know your page so will help you!

    also PM for more!
     
    vinayendra, Jan 14, 2009 IP
  3. sebastya

    sebastya Well-Known Member

    Messages:
    2,449
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    138
    As Seller:
    100% - 0
    As Buyer:
    100% - 1
    #3
    will increase free sig link to 2 months
     
    sebastya, Jan 14, 2009 IP
  4. chmdznr

    chmdznr Active Member

    Messages:
    417
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    let me know if you haven't resolved this
     
    chmdznr, Jan 14, 2009 IP
  5. chmdznr

    chmdznr Active Member

    Messages:
    417
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    sent you a pm..
    how does the code results look?
    Let me know the result so I can fix the error
     
    chmdznr, Jan 14, 2009 IP
  6. manijifera

    manijifera Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    i guess this works fine
    
    
    <?php 
    echo "<table border=\"1\">";
    $tr = "1";
    
    for ($i=1;$i<=15;$i++)  // <-- replace this with while statement 
    {
    if($tr == "1")
    {
    echo "<tr>";
    }
    echo "<td>";
    
    
    echo "data"; //<-- replace this for resuklts 
    
    
    
    echo "</td>";
    $tr++;
    if ($tr == "4")
    {
    echo "</tr>";
    $tr = "1";
    }
    } // end of your while statement.
    echo "</table>";
    
    ?>
    PHP:
     
    manijifera, Jan 14, 2009 IP