Global variable in php examples
A variable declaration out side the function is called as global variable.
We can’t access the global variable directly from the function. To access the global variable we can use $GLOBAL key word call the global variable. We can also call the global variable from function by re declaring the variable with GLOBAL key word with in the function.
A variable declaration out side the function is called as global variable.
We can’t access the global variable directly from the function. To access the global variable we can use $GLOBAL key word call the global variable. We can also call the global variable from function by re declaring the variable with GLOBAL key word with in the function.