Re: how do i...?
| From: | elias | Date: | Mon, 09 Apr 2001 17:04:08 +0000 |
| Subject: | Re: how do i...? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47729@lists.php.net to get a copy of this message | ||
Nice question!
You can use Eval() as:
$clsname = "myclass";
eval("\$inst = new $myclass;");
now $inst is an instance of myclass.
-elias
http://www.kameelah.org/eassoft
"rswfire" <rswfire@yahoo.com> wrote in message
news:20010407005837.71455.qmail@web10801.mail.yahoo.com...
> $var = "thisclass";
>
> $myclass = new $var;
>
> how can i make it recognize $var as a class name?
>
> thankz in advance...
>
> =====
> =====================================
> [ rswfire ]
>
> http://rswfire.swifte.net/
> http://profiles.yahoo.com/rswfire
>
> =====================================
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>