[phplib] Object instance From: Bogdan Morar (bogmor <email protected>)
Date: 03/27/01

Hello,

Supose I have a class which extend DB_Sql. Can I create an object
starting with the class name?

An example is:
class XYZ extend DB_Sql {
    var $classname = "XYZ";
    ...
}

In my file I can have:

$objXYZ = new XYZ;

but my question is about creation like this:

$tmp = "XYZ";
$objXYZ = new $tmp;

Are some method to build an object starting with the class name?
(like $objXYZ = new Class($tmp); ???? )

Thanks in advance,
Bogdan Morar
www.bogmor.com

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>