title: Echo all results from mysql_query
body: <p>I am trying to create a function that will query a database and output all the results from the array. For some reason it is only displaying one result.</p>
  
  <p>here is the function</p>
  
  <pre><code>function reguser_list() {
  $query = mysql_query("SELECT `user_name` FROM `users` WHERE `active` = 1");
  $reguser_names = mysql_fetch_assoc($query);
  $list_names = implode(', ', $reguser_names);
  
  echo $reguser_names;
  }
  </code></pre>
  
  <p>there are currently 2 users in the database that are active but this only display one name how can I get it to display both?</p>