久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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怎么將字符串轉(zhuǎn)為html

      php將字符串轉(zhuǎn)為html的方法:可以利用htmlentities()函數(shù)來實(shí)現(xiàn)。該函數(shù)可以把字符轉(zhuǎn)換為HTML實(shí)體,函數(shù)語(yǔ)法:【htmlentities(string,quotestyle,character-set)】。

      php怎么將字符串轉(zhuǎn)為html

      htmlentities() 函數(shù)把字符轉(zhuǎn)換為 HTML 實(shí)體。

      (推薦教程:php圖文教程)

      語(yǔ)法:

      htmlentities(string,quotestyle,character-set)

      實(shí)現(xiàn)代碼:

      <html> <body> <?php $str = "John & 'Adams'"; echo htmlentities($str, ENT_COMPAT); echo "<br />"; echo htmlentities($str, ENT_QUOTES); echo "<br />"; echo htmlentities($str, ENT_NOQUOTES); ?> </body> </html>

      (視頻教程推薦:php視頻教程)

      輸出:

      John & 'Adams' John & 'Adams' John & 'Adams'

      如果在瀏覽器中查看源代碼,會(huì)看到這些 HTML:

      <html> <body> John &amp; 'Adams'<br /> John &amp; &#039;Adams&#039;<br /> John &amp; 'Adams' </body> </html>

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