title: PHP -convert one column in 2D array into 1D array specfying column name
body: <p>I have a 2D array , which holds the result of a mysql query. here is my code</p>
  
  <pre><code>$res=$ $this-&gt;dbconnection-&gt;Query($Query);
  $query_result= array();
  while($colRow=mysqli_fetch_array($res))     
  {
      $query_result[]= $colRow;
  }
  </code></pre>
  
  <p>Now i want 1D array which contains all rows under a particular column in  $query_result.
  For example, the database table contains the fields Name and ID,I know , <code>$query_result[]= $colRow['Name']</code> will give query results into ID. But  I need all rows under Name and Id separately , such as <code>$name= $query_result['Name']</code>,<code>$Id= $query_result['ID']</code>. 
  Is there any easy way to accomplish this?</p>