note 2405 deleted from Variable variables by ronabop
| From: | ronabop@php.net | Date: | Sat, 19 Aug 2000 03:27:12 +0000 |
| Subject: | note 2405 deleted from Variable variables by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2595@lists.php.net to get a copy of this message | ||
I was wondering if anyone found a way to have variable classes. The following does not work.
<PRE>
$recordtype="Record";
$myRec= new ${$recordtype}();
</PRE>
nor does any of the following:
<PRE>
$myRec= new {$recordtype}();
$myRec= new $recordtype();
$myRec= new $$recordtype();
</PRE>
It seems to me that being able to use these with classes is really where you are able to get your
use. Can anyone help me with this?