note 37467 added to function.explode
| From: | coroa at cosmo-genics dot com | Date: | Sun, 16 Nov 2003 13:01:29 +0000 |
| Subject: | note 37467 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60455@lists.php.net to get a copy of this message | ||
To split a string containing multiple seperators between elements rather use preg_split than
explode:
preg_split ("/\s+/", "Here are to many spaces in between");
which gives you
array ("Here", "are", "to", "many", "spaces",
"in", "between");
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37467
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37467&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37467&report=yes
Search -- http://master.php.net/manage/user-notes.php