Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function objectToArray( $object )
- {
- if( !is_object( $object ) && !is_array( $object ) )
- {
- return $object;
- }
- if( is_object( $object ) )
- {
- $object = get_object_vars( $object );
- }
- return array_map( 'objectToArray', $object );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement