/ Published in: PHP
Expand |
Embed | Plain Text
$test = '23 124 124 4 2 21 4 142 lajdlkajsldkajs jasd 124 what great data t a a'; echo $test;
Comments
Subscribe to comments
You need to login to post a comment.
$test = '23 124 124 4 2 21 4 142 lajdlkajsldkajs jasd 124 what great data t a a'; echo $test;
Subscribe to comments
You need to login to post a comment.
That pattern also catches dollar signs, hyphens, and round brackets, none of which are whitespace. A better pattern would be '[\s]{2,}'.
I'm not sure if '[\s]{2,}' is php compatible - the above snippet has been amended slightly