Splitting a string on multiple separators in PHP

前端 未结 6 506
走了就别回头了
走了就别回头了 2021-01-25 03:50

I can split a string with a comma using preg_split, like

$words = preg_split(\'/[,]/\', $string);

How can I use a dot, a space and

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-25 04:38

    something like this?

    result:

    Array
    (
        [0] => blsdk
        [1] => bldf
        [2] => las
        [3] => kbdl
        [4] => aksm
        [5] => alskbdklasd
    )
    

提交回复
热议问题