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;}本文共 254 字,大约阅读时间需要 1 分钟。
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;}转载于:https://my.oschina.net/guomingliang/blog/198507