Set new value into GLOBALS values : GLOBALS : Language Basics PHP Source Code


PHP Source Code » Language Basics » GLOBALS »

 

Set new value into GLOBALS values




<?php
   $somevar = 15;
   function addit() {
      $GLOBALS["somevar"]++;
   }
   addit();
   print "Somevar is ".$GLOBALS["somevar"];
?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» GLOBALS