PHP将数组转字符串
程序员文章站
2022-06-07 11:54:22
implode(',',$arr) //将数组转字符串 $arr = [ 'a'=>1, 'b'=>2, 'c'=>3, ]; $arr_string = implode(',',$arr); dump($arr_string); //打印为 string(5) "1,2,3" ......
implode(',',$arr)
//将数组转字符串 $arr = [ 'a'=>1, 'b'=>2, 'c'=>3, ]; $arr_string = implode(',',$arr); dump($arr_string); //打印为 string(5) "1,2,3"