title: Get specific key values as an array from array of object
body: <p>This is my code:</p>
  
  <pre><code>$a = array(
      array("a" =&gt; 1, "b" =&gt; 2),
      array("x" =&gt; 2, "a" =&gt; 2),
      array("d" =&gt; 100, "a" =&gt; 3, "b" =&gt; 2, "c" =&gt; 3)
  );
  $myArray = array();
  foreach ($a as $arr) {
      $myArray[] = $arr['a'];
  }
  print_r($myArray);
  </code></pre>
  
  <p>So, I get</p>
  
  <pre><code>Array
  (
      [0] =&gt; 1
      [1] =&gt; 2
      [2] =&gt; 3
  )
  </code></pre>
  
  <p>Is there any other way to do this without <code>for</code> loop? like using one are two <code>PHP array functions</code> to get the same response.</p>
  
  <p>The above is correct but still if there is any other better way to do this that would be appreciable! Because the same array <code>$a</code> in my code is required to be iterate many times. If I have any better way to do this so I can reduce another iteration( PHP still does iteration in built-in fns, I don't bother it).</p>