title: How to convert Multi-Dimensional Associative array in to Numeric Array in php, without looping?
body: <p>I created a working function for splitting following associative array into two numeric array. I wonder if there is a better method , avoid looping.</p>
  
  <p>I have an array as follows.</p>
  
  <pre>
  Array
  (
      [0] => stdClass Object
          (
              [CreatedAt] => 16/02/2014
              [Occurrence] => 1
          )
  
      [1] => stdClass Object
          (
              [CreatedAt] => 17/02/2014
              [Occurrence] => 8
          )
  
      [2] => stdClass Object
          (
              [CreatedAt] => 18/02/2014
              [Occurrence] => 4
          )
  
      [3] => stdClass Object
          (
              [CreatedAt] => 20/02/2014
              [Occurrence] => 11
          )
  
  )
  </pre>
  
  <p>Need to convert it into two numerical array</p>
  
  <pre>
  Array
  (
      [0] => 16/02/2014
      [1] => 17/02/2014
      [2] => 18/02/2014
      [3] => 20/02/2014
  )
  
  Array
  (
      [0] => 1
      [1] => 8
      [2] => 4
      [3] => 11
  )
  </pre>
  
  <p>I used a <code>foreach</code> loop </p>
  
  <pre>
  $array1 = array();
  $array2 = array();
  foreach ($mainArray as $key => $value) {
      $array1[] = $value->CreatedAt;
      $array2[] = $value->Occurrence;
  }
  print_r($array1);
  print_r($array2);
  </pre>
  
  <p>But if I have 1000 rows in mainArray, it will affect the performance. If you have a better solution, let us all know that.</p>