PHP将数组转字符串
程序员文章站
2023-10-29 11:33: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"