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

      php中字符替換函數是什么

      php中字符替換函數是str_replace()。str_replace()函數用于替換字符串中的一些字符,該函數是區(qū)分大小寫的。函數語法:【str_replace(find,replace,string,count)】。

      php中字符替換函數是什么

      php中字符替換函數是str_replace()。

      (推薦教程:php教程)

      函數介紹:

      str_replace() 函數替換字符串中的一些字符(區(qū)分大小寫)。

      注意:該函數是區(qū)分大小寫的。

      函數語法:

      str_replace(find,replace,string,count)

      參數介紹:

      • find 必需。規(guī)定要查找的值。

      • replace 必需。規(guī)定替換 find 中的值的值。

      • string 必需。規(guī)定被搜索的字符串。

      • count 可選。一個變量,對替換數進行計數。

      代碼實現:

      <?php   //實例一:字符串替換字符串   $str1 = str_replace("red","black","red green yellow pink purple");   echo $str1."";  //輸出結果為black green yellow pink purple ?> <?php   //實例二:字符串替換數組鍵值   $arr = array("blue","red","green","yellow");   $str1 = str_replace("red","pink",$arr,$i);   print_r($str1); ?>

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