Php add array value of 1st position if 0th position matches
<pre><code>Array ( [Hydraulics] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 1 ) [1] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 1 ) [3] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 1 ) [4] =&gt; Array ( [0] =&gt; Lesson2 [1] =&gt; 1 ) [5] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 1 ) ) [Waste Water Engineering] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 1 ) [1] =&gt; Array ( [0] =&gt; Lesson2 [1] =&gt; 1 ) [2] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 0 ) ) [RCC Structure Design] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 1 ) [1] =&gt; Array ( [0] =&gt; Lesson2 [1] =&gt; 1 ) [2] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 1 ) ) [Irrigation] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 0 ) [1] =&gt; Array ( [0] =&gt; Lesson2 [1] =&gt; 1 ) [2] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 1 ) ) [Plastic Blocks] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Lesson1 [1] =&gt; 1 ) [1] =&gt; Array ( [0] =&gt; Lesson2 [1] =&gt; 1 ) [2] =&gt; Array ( [0] =&gt; Lesson3 [1] =&gt; 1 ) ) )
</code></pre>

<p>If you see Hydraulics array lesson1 appears 2 times. I want to add Lesson1 1st position value to be added and delete other duplicate entries. I want to feed the data to google charts.I have removed some array part as it was too long.</p>