SyLon Posted November 22, 2007 Share Posted November 22, 2007 Hello everyone. Is there a way to go over each member of a given object using a foreach loop for example?? Here is an theoretical example: foreach( object_members($object) as $object_name->$value ) { echo $object_name.": ".$value; } OR foreach( objects_member_names($object) as $member_name ) { echo $member_name.": ".$object->$member_name; } I hope you an help me Thanks, Leon. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.