復制代碼 代碼如下:
function arr2str ($arr)
{
foreach ($arr as $v)
{
$v = join(",",$v); //可以用implode將一維數組轉換為用逗號連接的字符串
$temp[] = $v;
}
$t="";
foreach($temp as $v){
$t.="'".$v."'".",";
}
$t=substr($t,0,-1);
return $t;
}