View Single Post
  #11 (permalink)  
Old 07-12-2008, 04:16 AM
Miakoda Miakoda is offline
D-Web Trainee
 
Join Date: Jul 2008
Posts: 49
Miakoda is on a distinguished road
Default Re: DEFINE and GLOBAL variables in PHP

$a = 1; /* global scope */

function Test()
{
echo $a; /* reference to local scope variable */
}

Test();

the value of a in full program will be 1 because that is declare as global scope.
Reply With Quote