Set new value into GLOBALS values : GLOBALS « Language Basics « PHP
- PHP
- Language Basics
- GLOBALS
Set new value into GLOBALS values
<?php
$somevar = 15;
function addit() {
$GLOBALS["somevar"]++;
}
addit();
print "Somevar is ".$GLOBALS["somevar"];
?>
Related examples in the same category