Jason Godesky wrote:


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


Try:
$this->$field = $row[$field];

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to