I'm trying to display
$row["name"]
through the form of a HTML Table, like this:
echo "<html>
<table class="."table".">
<tr>
<td>".$row["name"]."</td>
</tr>
</table>
</html>";
I'm getting the row variable from here, too:
$query = "SELECT * FROM servers WHERE public = 1";
if ($result = $db->query($query)) {
while ($row = $result->fetch_assoc()) {
printf ("Server name: %s", $row["name"].'<br>');
printf ("Hostname: %s", $row["host"].'<br>');
printf ("Port: %s", $row["port"].'<br>');
printf ("Player count: %s", $row["players"].'<br>');
printf ("Server Status: %s", $row["status"].'<br>');
printf ("Last pinged: %s", $row["last_ping"].'<br>');
printf ("Current ms: %s", $row["ms"].'<br>');
}
$result->free();
}
It does successfully display the information printed, but doesn't seem to be able to put it into a table.
<table class="."table".">? – Try<table class=\"table\">or<table class='table'>More than likely the issue.