Regex. replace (line, @ "s +", ","); // convert the space to ","
S matches any blank characters, including spaces, tabs, line breaks, and Chinese fullwidth spaces.
S blank character:  // key of the city!
Tab ('u0009 ')
New Line (Line Feed) character ('u000a ')
Carriage return ('u000d ')
Page feed ('u000c ')
Alarm (bell) character ('u0007 ')
E escape character ('u001b ')
Control Operator of cx corresponding to x
Explode is a string that is hashed out by a string.
Split is to use regular expression to scatter strings.
|The code is as follows:||Copy code|
|$ Str = "123 456 ";
$ Patten = "/s + /";
$ Result = split ($ patten, $ str );
Echo join ("<br>", $ result );