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]
|