On Fri, 20 Jul 2001 15:34:48 +0200 Stefan Rusterholz wrote:
If you'r using PHP 4 use preg_split. (works also with php 3 = 3.09)
see http://www.php.net/manual/en/function.preg-split.php for detailed
information.
The split pattern you'd need is:
$sometext2split = hello world witha lot
: [PHP] Re: split on whitespace, preserving whitespace... (a
rephrase of the question)
On Fri, 20 Jul 2001 15:34:48 +0200 Stefan Rusterholz wrote:
If you'r using PHP 4 use preg_split. (works also with php 3 = 3.09)
see http://www.php.net/manual/en/function.preg-split.php for detailed
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Garth Dahlstrom) wrote:
$sometext2split = hello world witha lot ofwhitespaces!;
$myarray = preg_split (/\s+/,$sometext2split);
you should get
$myarray := ['hello', 'world', 'with', 'a', 'lot', 'of', 'whitespaces!']
3 matches
Mail list logo