<?php
include("config.php");
$sql="SELECT * from product_tbl where prod_status=1 order by prod_id desc LIMIT 6";
$result=mysql_query($sql);
while ($row=mysql_fetch_assoc($result)) {
echo "<table class='products' border=1 width=180>";
echo "<tr><td>";
echo "<center>";
echo $row['prod_name'];
echo "</center>";
echo "</td></tr>";
echo "<tr><td>";
echo "<img src='".$row['prod_img']."' height=200 width=178/>";
echo "</td></tr>";
echo "<tr><td>";
echo "<center>";
echo "Rs.".$row['prod_price'];
echo "</center>";
echo "</td></tr>";
echo "</table>";
}
答案 0 :(得分:1)
您使用td
尝试float:left
样式,或者您需要在行中尝试tr
样式float :left