久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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中,可以使用substr_replace()函數(shù)來替換字符串的首字符,語法格式“substr_replace(指定字符串對象,用于替換的字符,0,1)”。substr_replace()函數(shù)可以把字符串的一部分替換為另一個字符串。

      php怎么替換首字符

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      php替換字符串首字符

      <?php $str1 = 'hello world!'; $str2 = substr_replace($str1,'H',0,1); print_r($str2); ?>

      輸出:

      Hello world!

      【推薦學(xué)習(xí):《PHP視頻教程》】

      相關(guān)函數(shù)說明:

      substr_replace() 函數(shù)把字符串的一部分替換為另一個字符串。語法:

      substr_replace(string,replacement,start,length)

      php怎么替換首字符

      注釋:如果 start 參數(shù)是負(fù)數(shù)且 length 小于或者等于 start,則 length 為 0。

      返回值: 返回被替換的字符串。如果 string 是數(shù)組,則返回?cái)?shù)組。

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