title: php nested array to dictionary
body: <p>How can I get this:</p>
  
  <pre><code>(
  [0] =&gt; Array
      (
          [name] =&gt; variation
          [value] =&gt; variation1
      )
  
  [1] =&gt; Array
      (
          [name] =&gt; variationid
          [value] =&gt; 70105
      )
  
  [2] =&gt; Array
      (
          [name] =&gt; fullName
          [value] =&gt; 
      )
  
  [3] =&gt; Array
      (
          [name] =&gt; address
          [value] =&gt; 
      )
  
  [4] =&gt; Array
      (
          [name] =&gt; country
          [value] =&gt; usa
      )
  
  [5] =&gt; Array
      (
          [name] =&gt; state
          [value] =&gt; Utah
      )
  </code></pre>
  
  <p>to look like this:</p>
  
  <pre><code>$fields['variation']=&gt;variation1[variationid]=&gt;70105.. etc
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>foreach($_POST['fields'] as $key =&gt; $value){
      $fields[$key] = $value;
  }
  </code></pre>
  
  <p>I thought this should work, but it gives it back to me looking the exact same way. This is just a serializedArray() from jquery passed into POST;  I basically just want to be able to access it using the $fields['variation'] accessing. But it's making it difficult.</p>