Hi All, Can someone tell me which is better, or if there's a reason I should use one and not the other (since both seem to work), and if this is the correct way to access script variables inside functions (and classes):
Example 1 ======== $GLOBALS['db_name']="website"; function QueryDB() { echo $GLOBALS['var']; } QueryDB(); Example 2 ======== $db_name="website"; function QueryDB() { echo $GLOBALS['var']; } QueryDB(); Many thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php