unset function in php code example
Example 1: destroy php variable
// Destroy a variable
<?php
unset ($var1, $var2.... )
?>
Example 2: php unset array key
unset($dataArray['key']);
Example 3: php unset reference
$ref = &$var;
unset($ref);
// Destroy a variable
<?php
unset ($var1, $var2.... )
?>
unset($dataArray['key']);
$ref = &$var;
unset($ref);