How does this look now?
<?php
class dbconfig {
public $connInfo = array();
public $connInfo[$hostname] = 'host.com';
public $connInfo[$username] = 'dbuser';
public $connInfo[$password] = 'dbpass';
public $connInfo[$database] = 'mydbname';
public __construct() {
return $this->$connInfo;
}
}
?>
<?php
include_once("dbconfig.class.php");
class dbconn extends dbconfig {
public $DB;
public __constructor(){
$this->$connInfo = new dbconfig();
$username =
$hostname =
$password =
$database =
$DB = new PDO("mysql:host=$connInfo[$hostname];dbname=
$connInfo[$database]", $connInfo[$username], $connInfo[$password]);
return $DB;
}
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php