感謝回答,我真的很高興..我編輯了代碼,我想問問,如果我編輯它好嗎? :-)雖然循環在while循環
$result = $sql->query("SELECT * FROM `topic` ;");
while($row = $result->fetch_object())
{
$id=$row->id;
$photo=$row->photo;
$title=$row->title;
$shortinfo=$row->shortinfo;
echo"<div id='article'>
<a href='reporty.php?page=$id'><div id='article_img'><img src='$photo'/></div></a>
<div id='article_text'>
<h2>$title</h2>
<p>$shortinfo</p>
</div>
</div>";