title: Loading MySQL data into a PHP array
body: <p>I am trying to load a list of IDs into a PHP array which I can loop through. The SQL query I am using returns 283 rows when I run it in PHPMyAdmin. However, when I run the following PHP script, it only returns a single row (the first row). How can I modify my code to include all the rows from the resulting SQL query in my PHP array? </p>
  
  <p>Code: </p>
  
  <pre><code>//Get active listing IDs 
  $active = "SELECT L_ListingID FROM `markers`";
  $active = mysql_query($active) or die(mysql_error());
  
  if(is_resource($active) and mysql_num_rows($active)&gt;0){
  $row = mysql_fetch_array($active);
  print_r($row);
  };
  </code></pre>
  
  <p>Thanks,</p>