title: PHP : flatten array - fastest way?
body: <p>Is there any fast way to flatten an array and select subkeys ('key'&amp;'value' in this case) without running a foreach loop, or is the foreach always the fastest way?</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [key] =&gt; string
              [value] =&gt; a simple string
              [cas] =&gt; 0
          )
  
      [1] =&gt; Array
          (
              [key] =&gt; int
              [value] =&gt; 99
              [cas] =&gt; 0
          )
  
      [2] =&gt; Array
          (
              [key] =&gt; array
              [value] =&gt; Array
                  (
                      [0] =&gt; 11
                      [1] =&gt; 12
                  )
  
              [cas] =&gt; 0
          )
  
  )
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>Array
  (
      [int] =&gt; 99
      [string] =&gt; a simple string
      [array] =&gt; Array
          (
              [0] =&gt; 11
              [1] =&gt; 12
          )
  )
  </code></pre>