Reply to Re: [PHP] function reverse to get_object_vars

Your name:

Reply:


Posted by Richard Lynch on 03/15/05 18:30

> 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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация