organize the order of element and push the total of sub-array
<p>

<pre><code> $base_arr =   Array
  (
      1 =&gt; Array
          (
          0 =&gt; 1,
          1 =&gt; 2,
          2 =&gt; 5,
          3 =&gt; 5
          ),
      3 =&gt; Array
          (
          0 =&gt; 1,
          1 =&gt; 2
          ),
      7 =&gt; Array
          (
          0 =&gt; 1,
          1 =&gt; 4
          )
   );
</code></pre>

<p>I want to re organize the order of element and push the total of sub-array to the main array.the result I want to return like this:</p>

<pre><code> $new_arr =   Array(
     0 =&gt; 1,
     1 =&gt; 2,
     2 =&gt; 5,
     3 =&gt; 5,
     4 =&gt;13, //this is the total 1+2+5+5 = 13
     5 =&gt; 1,
     6 =&gt; 2,
     7 =&gt; 3,//this is the total 1+2 = 3
     8 =&gt; 1,
     9 =&gt; 4,
     10 =&gt;5 //this is the total 1+4 = 5

   );
</code></pre>

<p>Who can help me please ,thanks.</p>
