如何以表格格式排列


How to arrange this in table format

如何以表格格式排列?我无法以表格格式安排

<?php 
include("database.php");
$fileStorage = '../upload/'; 
$result = mysql_query("SELECT * FROM upload ORDER By no DESC limit 10") or die(mysql_error()); 
if (mysql_num_rows($result) > 0) { 
    while ($row = mysql_fetch_assoc($result)) { 
    <table>
    <tr>
    <td>echo $row['no'];</td>
   <td> echo $row['title'];</td>
        <td>echo '<a href="'. $fileStorage . $row['file'] .'" target="_blank">'. htmlentities('Click Here', ENT_COMPAT, 'UTF-8') .'</a><br />';</td></tr></table>
    } 
}
?>

用以下代码替换您的周期:

if (mysql_num_rows($result) > 0) {
    echo "<table>";
    while ($row = mysql_fetch_assoc($result)) {
        echo "<tr>";
        echo "<td>" . $row['no'] . "</td>";
        echo "<td>" . $row['title'] . "</td>";
        echo '<td><a href="' . $fileStorage . $row['file'] . '" target="_blank">' . htmlentities('Click Here', ENT_COMPAT, 'UTF-8') . '</a></td>';
        echo "</tr>";
    }
    echo "</table>";
}