Object members dynamic access?
| From: | Sean C. McCarthy | Date: | Thu, 16 Aug 2001 00:19:33 +0000 |
| Subject: | Object members dynamic access? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62921@lists.php.net to get a copy of this message | ||
Hi All,
I was wondering if it is possible to access dinamically to the members
of a class. I mean to access like:
----------------------
class foo {
var $bar;
var $barbar;
}
...
...
$foo_instance = new foo;
$somevar = $foo->$anothervar;
-----------------------------
I now this doesn't work, and have searched the manual and haven't found
anything on it. I doubt it since this is more or less the work of the
Arrays and not the way a class should behave. Anyway any ideas? thanks
in advance.
Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)