/ Published in: PHP
If you want to use this in a class, change the last line to:
` return array_map(array($this, __FUNCTION__), $object ); `
` return array_map(array($this, __FUNCTION__), $object ); `
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function objectToArray($object) { { return $object; } { } }
URL: http://www.sitepoint.com/forums/showthread.php?438748-convert-object-to-array