title: How to transform array into string where key of the parent array is together with values of the subarrays
body: <p>I have following array:</p>
  
  <pre><code>[2007] =&gt; array(457,321,156);
  [2008] =&gt; array(559,211,181);
  ...
  [2013] =&gt; array(325,121,101);
  </code></pre>
  
  <p>How can I transform it just like the following string?</p>
  
  <pre><code>[2007,457,324,156],[2008,559,211,181],...,[2013,325,121,101]
  </code></pre>
  
  <p>I tried it, but wasn't able to put the key of the parent array together with the values of the subarrays in the string:</p>
  
  <pre><code>// This give me the values of the subarray without the key of parent array.
  foreach($max as $k=&gt;$v){
      $new.='['.$v.','.$medium[$k].','.$min[$k].'],';
  }
  
  // This give me a 'Uninitialized string offset' error.
  foreach($resultMax as $k=&gt;$v){
      $new.='['.$v[$k].','.$v.','.$result06[$k].','.$resultMin[$k].'],';
  }
  </code></pre>
  
  <p>Many thanks in advance!</p>