title: loop through database and show in table
body: <p>I am trying to loop though my users database to show each username in the table in their own row. I can only get it to show one user but loops through this the number of rows there are. Code is below</p>
  
  <pre><code>&lt;?php
  require_once ('../login/connection.php');
  include ('functions.php');
  
  $query = "SELECT * FROM users";
  $results=mysql_query($query);
  $row_count=mysql_num_rows($results);
  $row_users = mysql_fetch_array($results);
  
  echo "&lt;table&gt;";
      for ($i=0; $i&lt;$row_count; $i++)
      {
      echo "&lt;table&gt;&lt;tr&gt;&lt;td&gt;".($row_users['email'])."&lt;/td&gt;&lt;/tr&gt;";
      }
      echo "&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>