我需要帮助在 PHP 中呈现数据:
我想使用 SQL 查询的结果来填充一个表,在 4 列网格中显示图像。这是我到目前为止所写的:
$result = mysql_query("SELECT * FROM gallery ORDER BY id ASC ");
while($row = mysql_fetch_array($result))
{
echo "<td align=\"center\" ><a href=\"upload_gallery/".$row['image_name']."\" rel=\"prettyPhoto[gallery1]\" title=\" \"><img src=\"upload_gallery/thumbnail/sml_".$row['image_name']."\" width=\"200\" height=\"170\" /></a></td>";
}