【发布时间】:2016-10-03 00:29:35
【问题描述】:
我正在将数据库中的数据检索到表中,但数据堆积在左侧而不是网格视图中。
include_once ('includes/db_connect.php');
$res = mysql_query("SELECT * FROM inventory ORDER BY id DESC");
echo "<table>";
while ($row = mysql_fetch_array($res)) {
echo "<tr>"; echo "<td>";?> <img src="<?php echo $row["image"]; ?>" height="200" width="280"> <?php echo "</tr>";
echo "<tr>"; echo "<td>"; echo $row['make']; echo " "; echo $row['model']; echo "</td>"; echo "</tr>";
}
echo "</table>";
我们将不胜感激。
【问题讨论】:
-
好吧,有了这个预期的结果,我们将无法为您提供帮助......抱歉 ;)
-
@Tobias Kum 我已经修好了,谢谢
标签: php mysql html-table