In a class I need to use $db and $connection variables for database connectivity. How do I grab these variables that are in the large part of the script, into the class? I tried using:
global $db;
global $connection;
but it tells me:
Parse error: parse error, expecting T_OLD_FUNCTION' orT_FUNCTION' or T_VAR' or'}'' in /xxx/xxxx/cart_class.php on line 3