title: Put result from mysql_query in php array
body: <p>I want to get some results from the MySQL database and put them in a array like this:</p>
  
  <pre><code>array("value2", "value2", "value3");
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>$models = array();
  $getmodels = mysql_query("select model from cars");
  while($res = mysql_fetch_array($getmodels)) {
      $models[$res['model']];
  }
  </code></pre>
  
  <p>This does not work, when i check if the model is in array i get FALSE:</p>
  
  <pre><code>in_array($_REQUEST['model'], $models))
  </code></pre>