//將字符串轉數組 $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" }