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
In above code i'm displaying Menu list from table. How to display these menus in two columns?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']?>"> <?=$row['menu_name']?></td>
</tr>
<?}
}?>
</table>




Reply With Quote