Current Location: Home> Function Categories> unset

unset

Free the given variable
Name:unset
Category:Variable processing
Programming Language:php
One-line Description:Unset the variable.

Definition and usage

The unset() function clears the specified variable.

Example

Destroy variables:

 <?php  
$a = "Hello world!" ;  
echo "Delete the value of the previous variable 'a': " . $a . "<br>" ;  
unset ( $a ) ;  
echo "The value of the variable 'a' after deletion: " . $a ;  
?>

Try it yourself

grammar

 unset ( variable , ... . ) ;
parameter describe
variable Required. Specifies the variable to be unset.
... Optional. Another variable to unset.
Similar Functions
Popular Articles