title: Retrieving a column from mySQL database and passing to array
body: <p>I have previously constructed an array manually, e.g.:</p>
  
  <pre><code>&lt;?php
  $noupload = array('nick', 'cliff');
  ?&gt;
  </code></pre>
  
  <p>but now I am trying to populate the array automatically from users in a MySQL database.  So far I have this:</p>
  
  <pre><code>&lt;?php
  // Make a MySQL Connection
  $debug=false;
  $conn = mysql_connect("host","user","password"); // your MySQL connection data
  $db = mysql_select_db("database");
  
  $query = "SELECT * FROM users WHERE access LIKE '%listen%'"; 
  
  $result = mysql_query($query) or die(mysql_error());
  
  while($row = mysql_fetch_array($result)){
      $listen = "'". $row['login']. "', ";
  }
  ?&gt;
  </code></pre>
  
  <p><code>$listen</code> constructs the user list in the way that I previously entered it manually (I tested this using echo), but I am not sure how to pass this to <code>$noupload</code>.  I tried:</p>
  
  <p><code>$noupload = array($listen);</code></p>
  
  <p>but this didn't work.  I think I'm close and would be grateful for some help over the final hurdle, </p>
  
  <p>Thanks,</p>
  
  <p>Nick</p>