Mega Code Archive

 
Categories / Php / Language Basics
 

Overriding Scope with the GLOBALS Array

function foo( ) {             $GLOBALS['bar'] = "wombat";     }     $bar = "baz";     foo( );     print $bar;