title: PHP - Two dimensional array
body: <p>I'm quite new to PHP and I'm havint some trouble understanding how I'm supposed to turn something like this:</p>
  
  <pre><code>Array
  (
      [name] =&gt; Array
          (
              [0] =&gt; Bob
              [1] =&gt; Tom
              [2] =&gt; Ryan
              [3] =&gt; Lisa
              [4] =&gt; Peter
          )
      [age] =&gt; Array
          (
              [0] =&gt; 23
              [1] =&gt; 33
              [2] =&gt; 43
              [3] =&gt; 33
              [4] =&gt; 29
          )
  )
  </code></pre>
  
  <p>Into this kind of an array:</p>
  
  <pre><code>   Array
      (
          [person] =&gt; Array
              (
                 [name] =&gt; Bob
                 [age] =&gt; 23
              )
          [person] =&gt; Array
              (
                 [name] =&gt; Tom
                 [age] =&gt; 33
              )
      )
  </code></pre>
  
  <p>So I wan't to be able to have a person key, rather than name and age keys. And to put identical indexes from name and age into this person key. How would I go about achieving this?</p>
  
  <p>Thanks.</p>