variable global php code example
Example 1: php global variable function
<?php
$myVariable = "a";
function changeVar($newVar) {
global $myVariable
$myVariable = "b";
}
echo $myVariable; // Should echo b
?>
Example 2: php globals
$GLOBALS["foo"]