久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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怎么刪除span標(biāo)簽

      在php中,可以利用strip_tags()函數(shù)來刪除span標(biāo)簽,該函數(shù)可以剝?nèi)プ址械腍TML、XML以及PHP的標(biāo)簽,語法“strip_tags(string,allow)”;allow是一個(gè)可選參數(shù),用于指定可以被保留下的標(biāo)簽。

      php怎么刪除span標(biāo)簽

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      php刪除span標(biāo)簽

      在php中,可以利用strip_tags()函數(shù)來刪除span標(biāo)簽。

      <?php header("Content-type:text/html;charset=utf-8"); $str = "<span style='color:red;'>Hello</span> world!"; echo $str."<br>"; echo strip_tags($str)."<br>"; ?>

      輸出結(jié)果:

      php怎么刪除span標(biāo)簽

      strip_tags() 函數(shù)剝?nèi)プ址械?HTML、XML 以及 PHP 的標(biāo)簽。語法格式:

      strip_tags(string,allow)
      • string 必需。規(guī)定要檢查的字符串。

      • allow 可選。規(guī)定允許的標(biāo)簽。這些標(biāo)簽不會(huì)被刪除。

      <?php header("Content-type:text/html;charset=utf-8"); $str = "<span style='color:red;'>Hello</span> <b>world!</b>"; echo $str."<br>"; echo strip_tags($str)."<br>"; echo strip_tags($str,"<b>")."<br>"; ?>

      輸出結(jié)果:

      php怎么刪除span標(biāo)簽

      注釋:該函數(shù)始終會(huì)剝離 HTML 注釋。這點(diǎn)無法通過 allow 參數(shù)改變。

      推薦學(xué)習(xí):《PHP視頻教程》

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