I’m trying to do the following. This does not work. But how can I get it to work? I want to make a table populate with a php loop.
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>";
Break out out php and just write the HTML like you normally would. When you need to output something in PHP, open a tag and do what you need to do
i.e.