title: PHP unset parts of a nested array
body: <p>Trying to process an array and remove a specific associative array in a larger array set. The code I have now works in removing the specific sections locally, within the for loop, but doesn't effect the original <code>$cursor</code> array. </p>
  
  <pre><code>foreach($cursor as $key) {
  
      foreach($key as $value =&gt; $k){
  
          if ($value == 'user'){
  
              unset($k['confinfo']);
          }
      }   
  }
  </code></pre>
  
  <p>Is it a GLOBAL variable problem? How to unset the original variable?</p>