I have several variables for which I need access to more functions than I originally thought.
What would be the best way to include them in our growing list of features?
I have something like
$site = 'a'; $admin = 'b'; $dir = 'c'; $ma_plug = 'd'; $base = 'e';
I need almost all of them in most of my functions. I originally did
function a(){ global $site, $admin, $dir, $ma_plug, $base; //Write the A function } function b(){ global $site, $admin, $dir, $ma_plug, $base; //Write the B function }
It was great until I realized that I have more writing features than I originally thought.
What would be the best way to get all of these variables into the scope of (almost) every function? How did i do this? Or something like using constants? I would like to avoid using session() , if at all possible
Xhynk source share