PHP example - How to unset a global variable inside of a PHP function?
PHP - How to unset a global variable inside of a PHP function?
In order to do this the $GLOBALS array should be used, for example:
<?php
function MyFunction()
{
unset($GLOBALS["myVar"]);
}
$myVar="value";
MyFunction();
?>