Tuesday, February 8, 2011

Accessing a variable defined in a parent function

Programmer Question

Is there a way to access $foo from within inner()?



function outer()
{
$foo = "...";

function inner()
{
// print $foo
}

inner();
}

outer();


Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails