我想列出每個項目旁邊的複選框。出於某種原因,我可以打印列表,但複選框沒有顯示出來。PHP列表和複選框
$note = mysql_fetch_array($note_content);
if($note['type'] == 'list')
{
$note_type='list';
print "<dl>";
while($note = mysql_fetch_array($note_content))
{
if($note['complete'])
echo "<strike>";
echo "<dt>".$note['body']."</dt>";
if($note['complete'])
echo "</strike>";
}
print "</dl>";
print "<dl style=\"float:right\">";
while($note = mysql_fetch_array($note_content))
{
echo "<dt>
<input type='checkbox' name='complete_goal' value='".$note['note_id']."'>
</input>
</dt>";
}
print "</dl>";
}
else
{
echo $note['body'];
}
這給了我一個無限循環的複選框。 – 2012-01-09 06:20:04