PHP将字符转数组
程序员文章站
2022-05-21 14:50:41
explode(',',$arr_string) //将字符串转数组 $arr_string = '1,2,3'; $arr = explode(',',$arr_string); dump($arr); //打印输出如下 array(3) { [0] => string(1) "1" [1] => ......
explode(',',$arr_string)
//将字符串转数组 $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" }
上一篇: jsp根据参数默认选中radio