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

      php怎么去掉字符串后幾位

      在PHP中可以通過substr函數(shù)實(shí)現(xiàn)去掉字符串后幾位,其實(shí)現(xiàn)代碼語(yǔ)句如“echo substr("Hello world",0,5)”。

      php怎么去掉字符串后幾位

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

      php怎么去掉字符串后幾位?

      在PHP中可以通過substr函數(shù)去掉字符串后幾位。

      substr() 函數(shù)返回字符串的一部分。

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

      示例:

      使用帶有不同正負(fù)數(shù)的 start 和 length 參數(shù):

      <?php echo substr("Hello world",0,10)."<br>"; echo substr("Hello world",1,8)."<br>"; echo substr("Hello world",0,5)."<br>"; echo substr("Hello world",6,6)."<br>"; echo substr("Hello world",0,-1)."<br>"; echo substr("Hello world",-10,-2)."<br>"; echo substr("Hello world",0,-6)."<br>"; echo substr("Hello world",-2-3)."<br>"; ?>

      運(yùn)行結(jié)果:

      Hello worl ello wor Hello world Hello worl ello wor Hello world

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

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