//将字符串转数组 $arr_string = '1,2,3'; $arr = explode(',',$arr_string); dump($arr); //打印输出如下 array(3) { [0] => string(1) "1" [1] => string(1) "2" [2] => string(1) "3" }