Posted in PHP onJanuary 15, 2014
function std_class_object_to_array($stdclassobject) { $_array = is_object($stdclassobject) ? get_object_vars($stdclassobject) : $stdclassobject; foreach ($_array as $key => $value) { $value = (is_array($value) || is_object($value)) ? std_class_object_to_array($value) : $value; $array[$key] = $value; } return $array; }
php object转数组示例
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@