<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_28335"> <div class="blockcode"> <div id="code_PAY"><ol> <li> <li><?php<li>/**<li>* 对象转换为数组<li>* link:bbs.it-home.org<li>* date:2013/2/22<li>*/<li>function object_to_array($obj)<li>{<li>$_arr = is_object($obj) ? get_object_vars($obj) : $obj;<li>foreach ($_arr as $key => $val)</li> <li>{</li> <li>$val = (is_array($val) || is_object($val)) ? object_to_array($val) : $val;</li> <li>$arr[$key] = $val;</li> <li>}</li> <li>return $arr;</li> <li>}</li> <li>?></li> </ol></div> <em onclick="copycode($('code_PAY'));">复制代码</em> </div> </td></tr></table> <div id="comment_28335" class="cm"> </div> <div id="post_rate_div_28335"></div> <br><br>