title: PHP HTML Tables
body: <p>I'm trying to display</p>
  
  <pre><code>$row["name"]
  </code></pre>
  
  <p>through the form of a HTML Table, like this:</p>
  
  <pre><code>echo "&lt;html&gt;
  &lt;table class="."table"."&gt;
    &lt;tr&gt;
      &lt;td&gt;".$row["name"]."&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/html&gt;";
  </code></pre>
  
  <p>I'm getting the row variable from here, too:</p>
  
  <pre><code>$query = "SELECT * FROM servers WHERE public = 1";
  
  if ($result = $db-&gt;query($query)) {
  
  while ($row = $result-&gt;fetch_assoc()) {
      printf ("Server name: %s", $row["name"].'&lt;br&gt;');
      printf ("Hostname: %s", $row["host"].'&lt;br&gt;');
      printf ("Port: %s", $row["port"].'&lt;br&gt;');
      printf ("Player count: %s", $row["players"].'&lt;br&gt;');
      printf ("Server Status: %s", $row["status"].'&lt;br&gt;');
      printf ("Last pinged: %s", $row["last_ping"].'&lt;br&gt;');
      printf ("Current ms: %s", $row["ms"].'&lt;br&gt;');
  
  }
  
  $result-&gt;free();
  }
  </code></pre>
  
  <p>It does successfully display the information printed, but doesn't seem to be able to put it into a table.</p>
  
  <p><a href="http://i.imgur.com/n4C3lb1.png" rel="nofollow">http://i.imgur.com/n4C3lb1.png</a></p>