• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風信網絡科技有限公司微信公眾號

      當前位置:主頁 > 技術支持 > PHP > php去掉字符串的最后一個字符

      php去掉字符串的最后一個字符

      時間:2016-01-27來源:風信官網 點擊: 718次
      原字符串1,2,3,4,5,6,
      去掉最后一個字符",",最終結果為1,2,3,4,5,6

      代碼如下:

          $str = "1,2,3,4,5,6,";
          $newstr = substr($str,0,strlen($str)-1);
          echo $newstr;
          //echo 1,2,3,4,5,6


      系統(tǒng)自帶的函數即可實現這樣的效果,兩種方法:

          substr($str, 0, -1)
          //函數2
          rtrim($str, ",")
      熱門關鍵詞: php 字符串 最后一個字符
      欄目列表
      推薦內容
      熱點內容
      展開
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>