对象与数组的转换 无 function arraytoobject($e){ if( gettype($e)!='array' ) return; foreach($e as $k=$v){ if( gettype($v)=='array' || gettype($v)=='object' ) $e[$k]=(object)arraytoobject($v); } return (object)$e;} function objecttoarray($e){
对象与数组的转换 function arraytoobject($e){ if( gettype($e)!='array' ) return; foreach($e as $k=>$v){ if( gettype($v)=='array' || gettype($v)=='object' ) $e[$k]=(object)arraytoobject($v); } return (object)$e;} function objecttoarray($e){ $e=(array)$e; foreach($e as $k=>$v){ if( gettype($v)=='resource' ) return; if( gettype($v)=='object' || gettype($v)=='array' ) $e[$k]=(array)objecttoarray($v); } return $e;}