View Single Post

  #1 (permalink)  
Old 06-01-2005
Mitja
 
Posts: n/a
Default include() and scopes

Hello,

given the following scenario, how can I make _a visible in 3.php? Below is
what I /tought/ would work...

1.php:
global $_a;
$_a = 42;

2.php:
include('1.php');
include('3.php');
foo();

3.php:
function foo() {
print $_a; //prints nothing
}


TIA,
Mitja
Reply With Quote