Date: 03/27/01
- Next message: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Previous message: Andreas Aderhold: "[phplib] Compiled templates vs. parsed"
- In reply to: Bogdan Morar: "[phplib] Object instance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 27 Mar 2001, Bogdan Morar wrote:
> 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;
>
Yes, you can do this in php4. (Never tried in php3)
-n
-- ...... nathan hruby - nhruby <email protected> computer support specialist department of drama and theatre http://www.drama.uga.edu/ ......--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Previous message: Andreas Aderhold: "[phplib] Compiled templates vs. parsed"
- In reply to: Bogdan Morar: "[phplib] Object instance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

