$GLOBALS with property : GLOBALS « Language Basics « PHP






$GLOBALS with property

 
<?php

$a = 7;
function test() {
  $GLOBALS['a'] = 20;
}
test();
echo "\$a = $a\n";
?>
  
  








Related examples in the same category

1.Set new value into GLOBALS values
2.Looping Through the $GLOBALS Array
3.Accessing Global Variables with the global Statement
4.Create global variables
5.Modifying a Variable with $GLOBALS
6.Global vs function level
7.Overriding Scope with the GLOBALS Array