function object2array(&$object) {
$object = json_decode( json_encode( $object),true);
return $object;}

上述代码即可将obj转换为array数组形式了[……]

阅读全文