Remove Specific Elements from 2D Array
<pre><code>Array ( 
        [0] =&gt; Array ( 
                      [0] =&gt; a
                      [1] =&gt; b  
                      [2] =&gt; c
                      [3] =&gt; c 
                      [4] =&gt; d
                     )
       ) 
</code></pre>

<p>I have 2D array as of <code>$arr[0][$i];</code></p>

<p><code>$i</code> is the only part that increments, whereas <code>0</code> is fixed.</p>

<p><strong>1. I need to remove element a and b via a search inside the array.</strong></p>

<p><em>My attempt did not delete the elements:</em></p>

<pre><code>$posts = array_diff($posts, array("a", "b"));
</code></pre>

<p><strong>2. I would like to eliminate all duplicated values and leave only one i.e. removing all c's except one c.</strong></p>

<p>The final output would be:</p>

<pre><code>Array ( 
        [0] =&gt; Array (  
                      [0] =&gt; c
                      [1] =&gt; d
                     )
       ) 
</code></pre>

<p>I'm trying to figure it out, however, your help will be very much appreciated.</p>
