我正在尝试执行以下操作。这不起作用。但是我怎样才能让它工作呢?我想用一个 php 循环填充一个表。
echo "<table>";
echo "<thead>";
echo "<tr>";
echo "<th scope=\"col\"> Column1 </th>";
echo "<th scope=\"col\"> Column2 </th>";
echo "<th scope=\"col\"> Column3 </th>";
echo "</tr>";
echo "</thead>";
echo <tbody>
echo <tr>
echo <?php while($row = MySQL_fetch_array($result)) { ?>
echo <?php $link = $row['mirlyn'];?>
echo <td><?php echo(htmlentities($row['data1'])); ?></td>
echo <td><?php echo(htmlentities($row['data2'])); ?></td>
echo <td><?php echo(htmlentities($row['data3'])); ?></td>
echo <?php}?>
echo </tr>
echo </tbody>
echo "</table>";