Results 1 to 8 of 8

Thread: [RESOLVED]How to display data in two columns?

Threaded View

  1. #1

    Thread Starter
    Lively Member rasana's Avatar
    Join Date
    Jan 2007
    Location
    Mumbai, (India)
    Posts
    94

    Smile [RESOLVED]How to display data in two columns?

    Hi all,

    I'm creating a page where I have to take data from mysql db
    and display it on page.
    Data should display in two columns.
    But using while{} I can display data in one column only.
    here, i'm giving code

    PHP Code:
    <table align="center">
    <tr>
        <td colspan="2" align="center"><font class="txtSecHdr">
                                                  Select Menu</font></td>
    </tr>
    <? $disp="select m_id, menu_name from admin_menu where m_id='0' order by id";
        $result=mysql_query($disp,$conn);
        if(mysql_num_rows($result)){
        while($row=mysql_fetch_array($result)){
    ?>
    <tr>
        <td colspan="2"><input type="checkbox" name="chk" value="<?=$row['id']?>">&nbsp;&nbsp;&nbsp;<?=$row['menu_name']?></td>
    </tr>
    <?}
    }?>
    </table>
    In above code i'm displaying Menu list from table. How to display these menus in two columns?
    Last edited by rasana; Oct 26th, 2007 at 07:59 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width