Split sentence into words

后端 未结 3 1678
我寻月下人不归
我寻月下人不归 2021-01-16 15:25

for example i have sentenes like this:

$text = \"word, word w.d. word!..\";

I need array like this

Array
(
    [0] => w         


        
3条回答
  •  再見小時候
    2021-01-16 16:08

    Use the function explode, that will split the string into an array

    $words = explode(" ", $text);
    

提交回复
热议问题