I am fairly new to object oriented programming. I made this class which connects to mysql database to be called from models. Is there any way i can include 'database.class.php'(my db class file)in index.php, make it global and then access it from any object like so\[code\]$object = new object;$object->dofunc();\[/code\]Also another question is dofunc() expects an array for argument, how do i make this array also global so it can be accessed from ANY where!Here is my db class\[code\]<?phpclass Database { private $db; public function connect($config) { if (is_array($config)) { extract($config); $db = mysqli_connect($host, $username, $password); if ($db) { echo "balbabla"; if (mysqli_select_db($db, $database)) { } else { throw new exception("<br/><strong>Could not connect to $database under $host</strong>"); } } else { throw new exception("<br/><strong>Could not connect to mySQL database! Please check your details</stromg>"); } } }}?>\[/code\]Also this is the file that contains the array\[code\]<?php//Configuration for the MVC Framework$_SETTINGS = array();//Routing settings!//Default controller(This controller will be loaded if there is none mentioned in the URI)$_SETTINGS['default_controller'] = 'User';//Default method(This will be the default method run if no method is mentioned in the URI)$_SETTINGS['default_method'] = 'Register';//Database settings$DB_SETTINGS['host'] = 'localhost';$DB_SETTINGS['username'] = 'root';$DB_SETTINGS['password'] = 'foobar';$DB_SETTINGS['database'] = 'freelance';?>\[/code\]Thanks in advance