I had this problem a little while ago. I had a function that included the file which had my variable in it. So at the top of my file with the variable, I added "gloabl $myvar" and when the function went to include the file everything was fine. I had something like this:
PHP Code:function incFunc()
{
$files = array("file1.php", "file2.php");
foreach($files as $file)
{
include($file);
}
}
// file1.php, example
global $config;
$config = array("var" => "variable", "welcome" => "bonjour");




Reply With Quote