is it good practice to use one file to control all global variables in php? a few requirements: variables would need to go in and out of functions variables would dynamically change variables will sometimes be assigned as arrays can't use the following syntax $GLOBAL[variable_name_here] whats the best way to achieve this? for example: var.inc contains a list of variables func.php contains a list of functions which requires variables from the .inc file my-about-page.php contains variables ONLY, so for example: in the my-about-page.php: <div id="menu"> <?php print $menu; ?> <!--- this variable would get the function that builds the menu and that function would get the menu links from a array in the var.inc file ---> </div> how can this be done? I've manged to achieve this using calls to the functions and $GLOBALS
just put include once statement in all php files where u want to use the functions and variables Or just make a header file which is included on all pages and include func and var file in that Regards alex