title: php mysqli result into an array not working as expected
body: <p>I have a php /mysqli query and I want to populate an array with the results:</p>
  
  <pre><code>$query3 ="SELECT * FROM conditions";
  $results = array();
  if ($result = mysqli_query($conn, $query3)){    
  
      while($row = mysqli_fetch_assoc($result))
       {
         $results[] = $row;
       }
  }
  print_r($results);
  </code></pre>
  
  <p>Something is wrong here -its making arrays within arrays I think. (to be honest I am confused by this result)</p>
  
  <p>How do I do this correctly!</p>
  
  <pre><code>Array (
      [0] =&gt; Array ( [condition_id] =&gt; 1 [condition_name] =&gt; Epilepsy )
      [1] =&gt; Array ( [condition_id] =&gt; 2 [condition_name] =&gt; ASD )
      [2] =&gt; Array ( [condition_id] =&gt; 3 [condition_name] =&gt; BESD )
      [3] =&gt; Array ( [condition_id] =&gt; 4 [condition_name] =&gt; HI )
      [4] =&gt; Array ( [condition_id] =&gt; 5 [condition_name] =&gt; Medical )
      [5] =&gt; Array ( ...
  </code></pre>
  
  <p>Thanks for all the help - now how should I create what I actually want which is one array with key=>value like this:</p>
  
  <p>array (1=>epilepsy, 2=>ASd...) - the numbers refer to the primary key.</p>
  
  <p>How do I populate an array from this query please?</p>