久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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去除字符串中的數(shù)字的方法

      php去除字符串中數(shù)字的方法:首先創(chuàng)建一個PHP示例文件;然后使用正則表達式“$class=preg_replace("/\d+/",'', $res);”實現(xiàn)去除字符串中的數(shù)字即可。

      php去除字符串中的數(shù)字的方法

      推薦:《PHP視頻教程》

      PHP去掉字符串中的數(shù)字

      這個比較簡單,但是也有些需要注意的地方,先貼代碼

      $class=preg_replace("\d+",'', $res);

      需要使用preg_replace函數(shù),但是只是這么寫的話,會報錯

      Warning: preg_replace(): Delimiter must not be alphanumeric or backslash

      翻譯過來就是定界符不能是字母數(shù)字或反斜線。

      想了一下,在正則表達式首尾加了一對/

      $class=preg_replace("/\d+/",'', $res);

      這樣就成功了

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