Retrieve variables from a function in PHP
Have you ever declared a function and wished you could get access to the variables within that function? As you may know, this is unable to happen until you make one simple declaration in that function.
function somefunction() {
//DECLARE THIS AND MAKE YOUR VARIABLE RECOGNIZED OUTSIDE THE FUNCTION
global $var1, $var2, $var3;
$var1 = “This [...]
Filed under: PHP, Web Development by Nathan Blazek
No Comments »









