Re: [PHP] Re: split on whitespace, preserving whitespace... (a rephrase of the question)

2001-07-20 Thread Garth Dahlstrom
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

Re: [PHP] Re: split on whitespace, preserving whitespace... (a rephrase of the question)

2001-07-20 Thread Stefan Rusterholz
: [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

Re: [PHP] Re: split on whitespace, preserving whitespace... (a rephrase of the question)

2001-07-20 Thread CC Zona
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!']