$hostname['application'] = '127.0.0.1';
$username['application'] = 'root';
$password['application'] = 'root';
$database['application'] = 'band';
$dbdriver['application'] = 'mysql';
class database
{
private $hostname;
private $username;
private $password;
protected $database;
private $dbdriver;
function __construct( $database )
{
}
}
$db = new database( 'application' );
still same question as before, but im still want to learn about how to make a simple pdo wrapper. can we somehow get $hostname['application'] , etc by just knowing the $x['database'] ? i mean what im trying to do is putting http://stackoverflow.com/questions/3880904/getting-a-variable-from-a-public-scope-to-connect-database. but im trying with different problems.
thanks for looking in.