Are variable object vars possible?
| From: | Jason Godesky | Date: | Thu, 02 Oct 2003 18:11:43 +0000 |
| Subject: | Are variable object vars possible? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164794@lists.php.net to get a copy of this message | ||
I've been playing with variable variables and variable functions lately, and I was wondering if there was anyway to use that with object variables? I'm trying to make classes that can store instances in a database, and I'd like to have an abstract parent class with a load() method ... but since each of its children have different variables, I need to do a SELECT * from the database, and for each field/row pair, do something like $this-
{$field} = $row[$field] If anyone knows how to do this, I'd appreciate your help-- Jason Godesky jason@tribaldawn.com http://www.tribaldawn.com/jason/