Hi,
Tuesday, February 11, 2003, 5:36:22 AM, you wrote:
JM> I have made a Mysql database class. I wanted to know how I could use
JM> that class in another class without using extend. For example:
JM> include 'db.php';
JM> $db = new db();
JM> ...some php code...
JM> class blah {
JM> va
PM
To: Justin Mazzi
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Class within a class
Use $GLOBALS['db'] (or whatever the variable name of the global variable
is).
Justin Mazzi wrote:
I have made a Mysql database class. I wanted to know how I could use
that class in another class without us
Use $GLOBALS['db'] (or whatever the variable name of the global variable
is).
Justin Mazzi wrote:
I have made a Mysql database class. I wanted to know how I could use
that class in another class without using extend. For example:
include 'db.php';
$db = new db();
...some php code...
class bl
3 matches
Mail list logo