我从数据库中得到结果并试图在页面上显示。但对齐不正确。我可以知道我该如何解决吗?
代码在视图
<?php
echo "<table align='center'>";
echo "<tr>";
echo "<td> Language ID: </td>";
echo "</tr>";
echo "<tr>";
echo "<td> Language Name: </td>";
echo "</tr>";
echo "<tr>";
echo "<td> Date Posted : </td>";
echo "</tr>";
if ($query == true) {
foreach ($query as $row) {
echo "<tr>";
echo "<td>" . $row -> pk_bint_language_id . "</td>";
echo "<td>" . $row -> vchr_language_name . "</td>";
echo "<td>" . $row -> bint_language_level . "</td>";
echo "<td>" . $row -> dat_updated_date . "</td>";
echo "</tr>";
}
}
echo "</table>";
?>
输出: