久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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ù)字的方法:可以利用正則表達式并結合preg_replace()函數(shù)來實現(xiàn)。preg_replace()函數(shù)可以執(zhí)行一個正則表達式的搜索與替換。

      php怎樣刪除字符串中的數(shù)字

      preg_replace 函數(shù)執(zhí)行一個正則表達式的搜索和替換。

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

      語法:

      preg_replace(mixed $pattern, mixed $replacement, mixed $subject[, int $limit = -1[, int &$count]])

      參數(shù):

      • $pattern: 要搜索的模式,可以是字符串或一個字符串數(shù)組。

      • $replacement: 用于替換的字符串或字符串數(shù)組。

      • $subject: 要搜索替換的目標字符串或字符串數(shù)組。

      • $limit: 可選,對于每個模式用于每個 subject 字符串的最大可替換次數(shù)。 默認是-1(無限制)。

      • $count: 可選,為替換執(zhí)行的次數(shù)。

      (學習視頻教程:php視頻教程)

      返回值:

      如果 subject 是一個數(shù)組, preg_replace() 返回一個數(shù)組, 其他情況下返回一個字符串。如果匹配被查找到,替換后的 subject 被返回,其他情況下 返回沒有改變的 subject。如果發(fā)生錯誤,返回 NULL。

      舉例:

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

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