title: Delete key with its values in a multidimensional array in WordPress
body: <p>I need to be able to remove a custom key from an array inserted into a WordPress options table, here is the array i get in return using print_r: </p>
  
  <pre><code>Array (
  [customkeyone] =&gt; Array (
     [itemname] =&gt; 'name'
     [sortorder] =&gt; 1
     [date] =&gt; 1393042529
     [target] =&gt; 1
     )
  [customkeytwo] =&gt; Array (
     [itemname] =&gt; 'nametwo'
     [sortorder] =&gt; 1
     [date] =&gt; 1393042525
     [target] =&gt; 1
     )
  [customkeythree] =&gt; Array (
     [itemname] =&gt; 'namethree'
     [sortorder] =&gt; 1
     [date] =&gt; 1393042522
     [target] =&gt; 1
     )
  )
  </code></pre>
  
  <p>I tried different methods and have come close but not able to actually remove/unset the entire custom key itself. Lets say I want to unset "customkeytwo", I would need a way to pass this custom id and remove it:</p>
  
  <p>Handler example:</p>
  
  <pre><code>if (isset($_GET['delete'])) {
  
      //ID in this case is "customkeytwo" 
      if ($_REQUEST['id'] != ''){
  
                  $id = $_REQUEST['id'];
                  $myoptions = get_option('myoptions'); 
  
                  //some method to unset the custom key with $id
  
                  //update with new results
                  update_option('myoptions', $myoptions); 
  </code></pre>
  
  <p>And this is how I want the result to be after I remove it:</p>
  
  <pre><code>Array (
  [customkeyone] =&gt; Array (
     [itemname] =&gt; 'name'
     [sortorder] =&gt; 1
     [date] =&gt; 1393042529
     [target] =&gt; 1
     )
  [customkeythree] =&gt; Array (
     [itemname] =&gt; 'namethree'
     [sortorder] =&gt; 1
     [date] =&gt; 1393042522
     [target] =&gt; 1
     ) 
  )
  </code></pre>