...

View Full Version : get variable from included file



archipuir
01-09-2010, 05:50 PM
Hi,

I have a master file in which I have included two external files. I tried to echo a variable in the 1st included file, which is defined in the second included file but it didn't work?




// File that tries to get the variable
<?php include("1st_file.php"); ?>

// File that defines the variable
<?php include("2nd_file.php"); ?>



How can I get a variable that is created in 2nd_file.php to 1st_file.php ?:confused:

kbluhm
01-09-2010, 05:52 PM
You cannot access a variable that does not yet exist.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum