Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

PHP Superglobal - $GLOBALS

<?php
$x = 75;
$y = 25;
 
function addition() {
  $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
 
addition();
echo $z;
?>
 
PREVIOUS NEXT
Tagged: #PHP #Superglobal
ADD COMMENT
Topic
Name
3+1 =