PHP » Miscellaneous » unset()

Syntax:
void unset(mixed var [, mixed var, ...])
var
Variable to unset.

Unsets a variable.

unset() destroys one or more variables and deallocates the memory associated with them.

Examples

Code:
<?php

$a = "Some data";

unset($a);
if (!isset($a)) {
   print "\$a is no longer available";
}

?>
Output:
$a is no longer available
Explanation:

unset() is used to remove the variable $a that had just been set.

See Also: