Overriding Scope with the GLOBALS Array : GLOBALS « Language Basics « PHP
- PHP
- Language Basics
- GLOBALS
Overriding Scope with the GLOBALS Array
function foo( ) {
$GLOBALS['bar'] = "wombat";
}
$bar = "baz";
foo( );
print $bar;
Related examples in the same category