title: How to convert submitted form array to this array on php?
body: <p>Lets suppose i have the following array submitted by a html form:</p>
  
  <pre><code>array(
      'firstname' =&gt; array('Sara','Jim'),
      'lastname'  =&gt; array('Gibson','Jobs')
  );
  </code></pre>
  
  <p>What i wanna achieve is the following array:</p>
  
  <pre><code>array(
      array(
          'firstname' =&gt; 'sara',
          'lastname'  =&gt; 'Gibson'
      ),
      array(
          'firstname' =&gt; 'Jim',
          'lastname'  =&gt; 'Jim'
      )
  );
  </code></pre>
  
  <p>I need a function to automatically sort the array not manually by entering data but automatically processing array data.</p>