Revision: 30683
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 19, 2010 08:47 by jmiller
Initial Code
function object_to_array($object){ $new = NULL; if (is_object($object)) { $object = (array) $object; } if (is_array($object)) { $new = array(); foreach ($object as $key => $val) { $key = preg_replace("/^\\0(.*)\\0/", "", $key); $new[$key] = $this->object_to_array($val); } } else { $new = $object; } return $new; }
Initial URL
Initial Description
Pass in object. Returns array.
Initial Title
Object to array
Initial Tags
object, array, convert
Initial Language
PHP