Help with variable scope
How can a make a variable retain its value
$myvar = 'some text';
require_once('./global.php');
require_once('./includes/functions_newpost.php');
Need $myvar to still have its value here, but it does not.
I can't put the require code first because it will mess with other variables. What I want to do is add on to a file and store some data to variables, require some other files I need, then use those variables.
Thanks
|