Re: function reverse to get_object_vars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hello
>
> Do you know how to implement function reverse to get_object_vars?
> For example if I have class and I wish to set it's properties from
> database with loop through the columns in table?

If you are willing to have the object properties be the same names as the
columns, you do an assignment:

$object->$column = $value;

See http://mysql_field_name and friends.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux