On Fri, 20 Jul 2001 09:32:00 -0400 "Jack Dempsey" wrote:
> $text = "This contans white space .";
> $matches = preg_split("/(\s+)/",$text,-1, PREG_SPLIT_DELIM_CAPTURE);
> echo implode('',$matches);
Nope that doesn't do it.
here's the test:
echo "<pre>[$text]<br>[". implode('',$matches)."]</pre>";
here's the output:
[This contans white space .]
If it were working the two lines should be identical.
Canada's Search Engine
> -----Original Message-----
> mmm... yeah... That's what I had before
> (acutally I was using the alias split)...
> it does NOT however preserve the areas
> of white space.
> Instead the target of:
> > > $wordsarr = ('This',' ','contans',' ','white',' ','space','
> You get:
> > > $wordsarr = ('This','','contans','','white','space','','.')
> which has totally destroyed the whitespace I'm trying to
> keep intacted.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]