久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php怎樣去除字符串中的換行符

      php去除字符串中的換行符的方法:可以利用php系統(tǒng)常量PHP_EOL結(jié)合str_replace()函數(shù)來實(shí)現(xiàn)。在PHP中換行可以用PHP_EOL來替代。str_replace()函數(shù)用來替換字符串中的一些字符。

      php怎樣去除字符串中的換行符

      str_replace() 函數(shù)替換字符串中的一些字符(區(qū)分大小寫),返回帶有替換值的字符串或數(shù)組。

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

      語法:

      str_replace(find,replace,string,count)

      (學(xué)習(xí)視頻推薦:php視頻教程)

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

      // 1)使用轉(zhuǎn)義字符函數(shù) <?php $str = str_replace(array("/r/n", "/r", "/n"), '', $str); ?> // 2)使用正則表達(dá)式替換 <?php $str = preg_replace('//s*/', '', $str); ?> // 3)使用PHP系統(tǒng)常量【推薦】 $str = str_replace(PHP_EOL, '', $str); ?>

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