From: "Ville Mattila" <[EMAIL PROTECTED]> > Would it be possible to make all hard-coded variables beginning with $_ > automatically global? I've found useful to set some variables per page > to $_PAGE variable (for example $_PAGE['title'] etc) that would be nice > to get available to all functions without extra procedures (like global > command). The best way could be that $_ variables can't be defined by > any user-input (forms, cookies etc)... > > Well, that's a explanation. I hope that someone would give any hint > concerning this subject. :)
You already have $GLOBALS as a global (scope wise) variable, just add to that if you want. $GLOBALS['page_title'] = 'etc'; Or you can add directly to $_GET, $_POST, etc, so long as it doesn't interfere with your forms. Maybe you need to use $_SESSION. Bottom line, the variables are already there, just use them. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php