Global Variables
Posted: Sun Jan 30, 2005 10:45 pm
Is this the correct way to setup a globals file? For stuff such as page titles, headers, footers, etc
I can then call a global like this:
Is that the correct way of doing things or is there a better method? thankyou.
Code: Select all
// globals.inc
$var1 = "text";
$var2 = "blah";
function reg_globals() {
global $var1, $var2;
}Code: Select all
include_once "globals.inc";
echo 'Var1: '.$var1;