geting a variable from public scope to connect database part 2

Vattermann

New Member
\[code\]$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' );\[/code\]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/...iable-from-a-public-scope-to-connect-database. but im trying with different problems. thanks for looking in.
 
Back
Top