Removing Elements : unset « Data Type « PHP






Removing Elements

 
<?php
  
  
  $dogs = array('A' => 'AA', 'Bud' => 'BB','C' => 'CC');

  printf("<pre>%s</pre>\n", var_export($dogs, TRUE));

  unset($dogs['C']);
  printf("<pre>%s</pre>\n", var_export($dogs, TRUE));
?>
  
  








Related examples in the same category

1.Removing Session Data
2.Deleting an object
3.void unset ( mixed var [, mixed var [, mixed ...]] )
4.Using the unset() Function
5.Removing Elements from Arrays