<p class="sougouContent"> <?xml version="1.0" encoding="UTF-8" ?><result><resultcode>0</resultcode><taskcode>5120130806091840</taskcode><errordescription></errordescription></result> <br> <br> <br> 我想取<resultcode>0</resultcode> 中间的0要怎么取啊 只要中间的0 每次数字是不一样的,我用字符串截取的总跑偏啊,求解决 </p> <br> <h2>回复讨论(解决方案)</h2> <p class="sougouAnswer"> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="sycode" name="code">preg_match('/<resultcode>(\d+)<\/resultcode>/s',$s,$m);echo $m[1];</pre><div class="contentsignin">登入後複製</div></div> </p>