久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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ù)組轉(zhuǎn)為字符串?

      php怎么把數(shù)組轉(zhuǎn)為字符串?下面本篇文章給大家介紹一下。有一定的參考價值,有需要的朋友可以參考一下,希望對大家有所幫助。

      php怎么把數(shù)組轉(zhuǎn)為字符串?

      在PHP中,可以使用explode() 函數(shù)將一個字符串轉(zhuǎn)化為一個一維數(shù)組,也可以使用一個功能與之相反的函數(shù)——implode()來將數(shù)組轉(zhuǎn)為字符串。

      implode() 函數(shù)可以將一個一維數(shù)組轉(zhuǎn)化為字符串,其語法格式如下:

      implode($glue, $array) 或者 implode($array)

      其中,$glue 用來設(shè)置一個字符串,表示使用 $glue 將數(shù)組每個元素連接在一起,默認(rèn)情況下 $glue 為空字符串;$array 為需要轉(zhuǎn)換的數(shù)組。

      提示:implode() 函數(shù)的 $glue 參數(shù)是可選的,可以省略。

      【示例】使用 implode() 函數(shù)將數(shù)組轉(zhuǎn)換為字符串。

      <?php     header("Content-Type: text/html; charset=utf-8");     $arr = ['php中文網(wǎng)','PHP教程','https://www.php.cn','implode()函數(shù)','數(shù)組轉(zhuǎn)字符串'];     $str = implode($arr);     echo $str.'<br>';     $str = implode(' ',$arr);     echo $str.'<br>';     $str = implode(',',$arr);     echo $str.'<br>';     $str = implode('--',$arr);     echo $str.'<br>'; ?>

      運行結(jié)果如下:

      php中文網(wǎng)PHP教程https://www.php.cnimplode()函數(shù)數(shù)組轉(zhuǎn)字符串 php中文網(wǎng) PHP教程 https://www.php.cn implode()函數(shù) 數(shù)組轉(zhuǎn)字符串 php中文網(wǎng),PHP教程,https://www.php.cn,implode()函數(shù),數(shù)組轉(zhuǎn)字符串 php中文網(wǎng)--PHP教程--https://www.php.cn--implode()函數(shù)--數(shù)組轉(zhuǎn)字符串

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