久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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ù)是str_replace()。str_replace()函數(shù)用于替換字符串中的一些字符,該函數(shù)是區(qū)分大小寫的。函數(shù)語法:【str_replace(find,replace,string,count)】。

      php中字符替換函數(shù)是什么

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

      (推薦教程:php教程)

      函數(shù)介紹:

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

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

      函數(shù)語法:

      str_replace(find,replace,string,count)

      參數(shù)介紹:

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

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

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

      • count 可選。一個變量,對替換數(shù)進(jìn)行計數(shù)。

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

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

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