数组转字符串之间相互转换
数组转字符串
implode
$array
=
array
(
'lastname'
,
'email'
,
'phone'
);
$comma_separated
= implode(
","
,
$array
);
字符串转数组
explode
$pizza
=
"piece1 piece2 piece3 piece4 piece5 piece6"
;
$pieces
=
explode
(
" "
,
$pizza
);