title: map array to key value pair in php
body: <p>I have the following array:</p>
  
  <pre><code>    array (size=2)
        'filename' =&gt; 
          array (size=2)
            0 =&gt; string 'f1' (length=2)
            1 =&gt; string 'f2' (length=2)
        'url' =&gt; 
          array (size=2)
            0 =&gt; string 'u1' (length=2)
            1 =&gt; string 'u2' (length=2)
  </code></pre>
  
  <p>I want to map it like so:</p>
  
  <pre><code>array (size=2)
    0 =&gt; 
      array (size=2)
        'filename' =&gt; string 'f1' (length=2)
        'url' =&gt; string 'u1' (length=2)
    1 =&gt; 
      array (size=2)
        'filename' =&gt; string 'f2' (length=2)
        'url' =&gt; string 'u2' (length=2)
  </code></pre>
  
  <p>How would I write such a map without knowing what the keys are called (filename and url). Would it also be possible for larger arrays?</p>