/ Published in: PHP

URL: http://www.sitepoint.com/forums/showthread.php?438748-convert-object-to-array
If you want to use this in a class, change the last line to:
return array_map(array($this, __FUNCTION__), $object );
Expand |
Embed | Plain Text
function objectToArray($object) { { return $object; } { } }
You need to login to post a comment.