How to get the properties of an object with PHP
How to get the properties of an object:
$ref = new ReflectionClass('User');
$props = $ref->getProperties();
foreach($props as $prop) {
echo $prop->name .'
';
}
In this case the properties of the class User will be printed.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home