0
在一個數據庫中有一些圖像[未知數],我需要顯示他們3連續 這裏是我的代碼,但它不工作[在某一行它顯示2或4張照片] :(顯示3張圖像在一張表中的10張圖像或更多的列表 - PHP
<?php
$temp=0;
$stmt = mysqli_prepare($con,"select PicName from Pic_Details");
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt,$picName);
while(mysqli_stmt_fetch($stmt))
{
if ($temp % 3==0)
echo '<tr>';
echo '<td valign="top" width="150px"><img src="'.$picName.'"/></td>';
if ($temp % 3==0)
echo '</tr>';
++$temp;
}
?>