title: PHP: Delete values from nested arrays
body: <p>I am extracting duplicated values from nested arrays. I would like to delete these extraceted items from the $bigarray. would you give me some ideas...?</p>
  
  <pre><code>$bigarray = array(                                                                                                                                                                                                                                                          
      "430" =&gt; array('milk', 'turky', 'apple'),
      "433" =&gt; array('milk', 'apple', 'orange', 'england'),
      "444" =&gt; array('milk', 'apple', 'orange', 'spain')
  );
  $intersected = null;
  foreach ($bigarray as $arr) {
    $intersected = $intersected ? array_intersect($arr, $intersected) : $arr;
    if (!$intersected) {
      break; // no reason to continue
    }
  }
  
  
  foreach ($intersected as $inter){
    foreach ($bigarray as $arr) { 
      foreach ($arr as $value=&gt;$key) {
        if ($key ==  $inter){
          unset($arr[$value]);
        }
      }
    //print_r($arr);
    }
  }
  print_r($bigarray );
  </code></pre>