You are here: Re: how to display object property? « PHP Programming Language « IT news, forums, messages
Re: how to display object property?

Posted by puzz on 12/21/07 15:31

jcoder wrote:
> hello,
>
> i have an object but i dont know what are the property field and
> values. what to do in php in order to see the properties. to make
> myself more clear, to view object property in javascript i do it this
> way:

There is also get_object_vars() :

class A { var $a = 1; var $b = "jlkjkl"; }
$a = new A();
$properties = get_object_vars( $a );
foreach( $properties as $k => $v ) {
print "$k -> $v <br/>";
}

--
www.panoye.com :: virtual tour

 

Navigation:

[Reply to this 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

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