try creating a file just for variables. eg vars.(inc|txt|etc).
include("vars.txt");
into your script. ANY of these variables that are going to be changed within a function should be set to global. eg:
vars.txt:
$this = "this";
$that = "that";
$num = 0;
test.php:
<?
include("vars.txt");
halb(); // this ONLY changes the variable within the function.
echo "this -> $this<BR>that -> $that<BR>num -> $num";
//returns "this -> this
// that -> that
// num -> 0
blah(); // this changes the variable for the rest of the script.
echo "this -> $this<BR>that -> $that<BR>num -> $num";
//returns "this -> hoo ha!
// that -> that
// num -> 0
function halb(){
$this = "hoo ha!";
}
function blah(){
global $this;
$this = "hoo ha!";
}
hope that helps explain things... if not, well... i tried...