日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
PHP數(shù)組轉(zhuǎn)字符串與PHP字符串轉(zhuǎn)數(shù)組的相關(guān)方法解析

我們今天為大家介紹的PHP數(shù)組轉(zhuǎn)字符串與PHP字符串轉(zhuǎn)數(shù)組的代碼將會(huì)用到函數(shù)implode() 和函數(shù)explode() 。其中implode() 函數(shù)是用來(lái)數(shù)組轉(zhuǎn)字符串時(shí)用,而explode() 函數(shù)則是用來(lái)處理字符串轉(zhuǎn)數(shù)組的。

#t#PHP數(shù)組轉(zhuǎn)字符串 implode()

 
 
 
  1.  
  2. $vegetables[0] = "corn";  
  3. $vegetables[1] = "broccoli";  
  4. $vegetables[2] = "zucchini";  
  5. $text = implode(",", $vegetables);  
  6. echo $text;  
  7. ?> 

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

corn,broccoli,zucchini

2 PHP字符串轉(zhuǎn)數(shù)組 explode()

 
 
 
  1.  
  2. $text = "corn, broccoli, zucchini";  
  3. $vegetables = explode(", ", $text);  
  4. print_r($vegetables);  
  5. ?> 

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

 
 
 
  1. Array  
  2. (  
  3. [0] => corn  
  4. [1] => broccoli  
  5. [2] => zucchini  

以上兩段代碼就是我們向大家介紹的關(guān)于PHP數(shù)組轉(zhuǎn)字符串和PHP字符串轉(zhuǎn)數(shù)組的相關(guān)代碼。


分享標(biāo)題:PHP數(shù)組轉(zhuǎn)字符串與PHP字符串轉(zhuǎn)數(shù)組的相關(guān)方法解析
轉(zhuǎn)載來(lái)源:http://m.5511xx.com/article/copdpoh.html