如何显示水平网格。我有垂直显示的代码。但我需要它水平显示。
<?php
$connect=mysql_connect("localhost","root","user");
mysql_selectdb("form");
$result=mysql_query("SELECT * FROM cath");
//echo "The details are....";
$dyn_table = '<table border="2" cellpadding="10">';
while($cath=mysql_fetch_array($result))
{
$ID=$cath["ID"];
$name=$cath["name"];
$email=$cath["email"];
$number=$cath["number"];
$org=$cath["org"];
$message=$cath["message"];
if ($cath==$cath)
{
$dyn_table .= '<tr><td>' . $name . '</td>';
$dyn_table .= '<tr><td>' . $email . '</td>';
$dyn_table .= '<tr><td>' . $number . '</td>';
$dyn_table .= '<tr><td>' . $org . '</td>';
$dyn_table .= '<tr><td>' . $message . '</td>';
}
}
$dyn_table .= '</tr></table>';
?>
<html>
<body>
<h3>PHP GRID LAYOUT</h3>
<?php
echo $dyn_table;
?>
</body>
</html>
你能帮我解决这个问题吗?等待最佳解决方案。
谢谢
卡西