代码如下:
function arr2str ($arr)
{
foreach ($arr as $v)
{
$v = join(",",$v); //可以用implode将一维数组转换为用逗号连接的字符串
$temp[] = $v;
}
$t="";
foreach($temp as $v){
$t.="'".$v."'".",";
}
$t=substr($t,-1);
return $t;
}
原文链接:https://www.f2er.com/php/25101.html{
foreach ($arr as $v)
{
$v = join(",",$v); //可以用implode将一维数组转换为用逗号连接的字符串
$temp[] = $v;
}
$t="";
foreach($temp as $v){
$t.="'".$v."'".",";
}
$t=substr($t,-1);
return $t;
}