implode把數組轉成字元串的函數,在組合SQL語句時候使用特好使! 比如 $a = array('a','b','c');$b = implode(',', $a);echo $b; 返回的字元串就是 a,b,c explode把字元串組成的數組 $pizza = "piece1 piece2
implode把數組轉成字元串的函數,在組合SQL語句時候使用特好使!
比如
$a = array('a','b','c');
$b = implode(',', $a);
echo $b;
返回的字元串就是 a,b,c
explode把字元串組成的數組
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);