Php 如何在表单布局上以3/3格式排列复选框
你好。有谁能告诉我如何排列从数据库检索到的菜系标签的复选框列表,当它显示时,它不是按顺序并排显示的?我希望它以3×3的格式显示。以下是代码:Php 如何在表单布局上以3/3格式排列复选框,php,html,css,Php,Html,Css,你好。有谁能告诉我如何排列从数据库检索到的菜系标签的复选框列表,当它显示时,它不是按顺序并排显示的?我希望它以3×3的格式显示。以下是代码: <div id="frmform"> <form name="frmrestaurant" id="frmrestaurant" method="post" onsubmit="" enctype="multipart/form-data"> <p class="msgsignup">Add Restaura
<div id="frmform">
<form name="frmrestaurant" id="frmrestaurant" method="post" onsubmit="" enctype="multipart/form-data">
<p class="msgsignup">Add Restaurant</p>
<div id="iderror"></div>
<div class="topinputs">
<div> <label for="restaurant_name" class="name">Restaurant Name :</label><input type="text" name="restaurant_name" size="32" id="restaurant_name" value="<?php echo $row->restaurant_name; ?>" class="validate[required,custom[onlyLetter],length[0,100]] text-input" /> </div>
</div>
<div> <label for="website" class="name">Website :</label><input size="32" type="text" name="website" id="website" value="<?php echo $row->website; ?>" class="validate[required,length[0,100]] text-input" /> </div>
<div> <label for="budget" class="name">Budget :</label>
<?php echo $this->lists['budget'];?>
</div>
<div> <label for="idcuisine" class="cuisine" >Cuisine:</label>
<?php echo $this->lists['cuisine'] ;?>
<div> <label for="idcategory" class="category">Category:</label>
<?php echo $this->lists['category'];?>
</div>
添加餐厅
餐厅名称:
烹饪:
类别:
菜肴和类别列表未正确显示
谢谢。这可以用php正确的逻辑来完成
<tr>
<?php
while($ofetch=$db->fetchNextObject($query))
{
$j++;
?>
<td width="33%">
<input type="checkbox" name="service[]" id="service" value="<?php echo $ofetch->service_id?>" /> some text
</td>
<?php if($j%3==0) { echo "</tr><tr>";}
}
?>
</tr>
烹饪:类别:如何设置这些列表的复选框格式