我試圖創建回顯圖像while循環與表,但我得到的錯誤。請參閱代碼while while循環中的圖像
$image = $rows['image'];
$sql = "SELECT * FROM boxes ";
$result = $db->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
if ($row['status'] == 1)
$visible = "visible";
else
$visible = "hidden";
if ($row['side'] == 1)
$side = "right";
else if ($row['side'] == 2)
$side = "left";
else $side = "not set yet";
echo "
<tr>
<td width=\"15%\" rowspan=\"3\"><img src="data:image' image \. ($row['image']).'" />';</td>
<td width=\"85%\" colspan=\"5\">".$row['title_boxe'] . "</td>
</tr>
<tr>
<td colspan=\"5\">desc</td>
</tr>
<tr>
<td>Visible</td>
<td>sss</td>
<td><form method='post'><input type='hidden' name='id' value='" . $row['id_boxe'] . "'/>
<input type='submit' name='update' value='Update' class=\"btn btn-primary\"/></form></td>
<td> </td>
</tr>
<tr>
<td colspan=\"6\">hr</td>
</tr>
<tr>
<td colspan=\"6\"> </td>
</tr>
";
}
}
?>
</tbody>
</table>
的一部分,有什麼不好這行代碼的PHP裏面,我可以找出如何解決這個...
<td width=\"15%\" rowspan=\"3\"><img src="data:image' image \. ($row['image']).'" />';</td>
許多感謝您的幫助。
顯示您的錯誤信息 – scaisEdge
被不顯示錯誤消息,只是在我的HTML編輯器上顯示紅線爲錯誤 – alidad7878