久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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實(shí)現(xiàn)刪除空格的函數(shù)有哪些

      php刪除空格的函數(shù)有:1、使用trim函數(shù)去除字符串兩側(cè)的普通空格;2、使用str_replace函數(shù)去除字符串中的空格;3、使用php strtr函數(shù)實(shí)現(xiàn)刪除空格。

      php實(shí)現(xiàn)刪除空格的函數(shù)有哪些

      推薦:《PHP視頻教程》

      php中去除字符串中的空格

      1.使用php函數(shù)trim():

       trim($str)

      可去除字符串兩側(cè)的普通空格;

      2.使用php函數(shù) :str_replace():

      str_replace(' ','',$str)

      3.使用php函數(shù):strtr():

      strtr($str,array(' '=>''))

      4.使用自己寫(xiě)的封裝函數(shù):

      function trimall($str)//刪除空格 {     $limit=array(" "," ","t","n","r");     $rep=array("","","","","");     return str_replace($limit,$rep,$str);  }

      5.使用該正則去掉普通空格:

      preg_replace('# #', '', $str)

      6.使用該正則去掉所有空格包括全角空格:

      $str =preg_replace("/s| /","",$str);

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