title: Isolate a single column in a multi-dimensional array
body: <p>Say for example you just queried a database and you recieved this 2D array.</p>
  
  <pre><code>$results = array(
      array('id' =&gt; 1, 'name' =&gt; 'red'  , 'spin' =&gt;  1),
      array('id' =&gt; 2, 'name' =&gt; 'green', 'spin' =&gt; -1),
      array('id' =&gt; 3, 'name' =&gt; 'blue' , 'spin' =&gt; .5)
  );
  </code></pre>
  
  <p>I often find myself writing loops like this.</p>
  
  <pre><code>foreach($results as $result)
      $names[] = $result['name'];
  </code></pre>
  
  <p>My questions is does there exist a way to get this array $names without using a loop?  Using callback functions count as using a loop.</p>
  
  <p>Here is a more generic example of getting every field.</p>
  
  <pre><code>foreach($results as $result)
      foreach($result as $key =&gt; $value)
          $fields[$key][] = $value;
  </code></pre>