久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php中如何使用正則表達(dá)式刪除a標(biāo)簽

      php中如何使用正則表達(dá)式刪除a標(biāo)簽

      目的:

      使用正則表達(dá)式刪除下列內(nèi)容中的a標(biāo)簽,同時(shí)保留a標(biāo)簽內(nèi)容

      <div>歡迎來(lái)到php中文網(wǎng)<a href=//www.php.cn>www.php.cn</a></div>

      修改后:

      <div>歡迎來(lái)到php中文網(wǎng)www.php.cn</div>

      解決方法:

      $str = "<div>歡迎來(lái)到php中文網(wǎng)<a href=//www.php.cn>www.php.cn</a></div>"; $str = htmlspecialchars_decode($str); $str = preg_replace("/<a[^>]*>(.*?)</a>/is", "$1", $str); echo $str;

      運(yùn)行結(jié)果為:

      <div>歡迎來(lái)到php中文網(wǎng)www.php.cn</div>

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)