1. Computing & Technology

Discuss in my forum

Unset () PHP Function

By , About.com Guide

Definition: Unset () is used to destroy a variable in PHP. In can be used to remove a single variable, multiple variables, or an element from an array. It is phrased as Unset ($remove).
Also Known As: Unset Variable, Destroy Variable
Examples:
 <?php 
 // remove a single variable 
 unset($a); 
 
 // remove a single element in an array 
 unset($my_array['element']); 
 
 // remove multiple variables 
 unset($a, $b, $c); 
 ?> 
Related Searches array element unset variables lt

©2012 About.com. All rights reserved.

A part of The New York Times Company.