function arr_to_str($arr) { $t ='' ; foreach ($arr as $v) { $v = implode(",",$v); // 可以用implode将一维数组转换为用逗号连接的字符串,join是别名 $temp[] = $v; } foreach ($temp as $v) { $t.=$v.","; } $t = substr($t, 0, -1); // 利用字符串截取函数消除最后一个逗号 return $t; }
本文属原创,转载请注明原文:https://zhimatong.com/jiaocheng/696.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。