dh at argosign dot de -
it is possible to unset globals from within functions thanks to the $GLOBALS array:
<?php
$x = 10;
function test() {
// don't need to do ' global $x; '
unset ($GLOBALS['x']);
echo 'x: ' . $GLOBALS['x'] . '<br />';
}
test();
echo "x: $x<br />";
// will result in
/*
x:
x:
*/
?>