[PHP] replacing multiple spaces with one

2002-07-15 Thread David Russell
Hi all (easy one - I think) I need to replace all instances of multiple spaces in a string with a single space. I tries the following: $ArticleText = str_replace(' ', ' ', $ArticleText); but if I have four spaces, I am left with two - this is wrong... I am sure that I am really looking

Re: [PHP] replacing multiple spaces with one

2002-07-15 Thread nico_free
[EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:15 PM Subject: [PHP] replacing multiple spaces with one Hi all (easy one - I think) I need to replace all instances of multiple spaces in a string with a single space. I tries the following: $ArticleText = str_replace(' ', ' ', $ArticleText

Re: [PHP] replacing multiple spaces with one

2002-07-15 Thread Jason Wong
On Tuesday 16 July 2002 00:15, David Russell wrote: Hi all (easy one - I think) I need to replace all instances of multiple spaces in a string with a single space. I tries the following: $ArticleText = str_replace(' ', ' ', $ArticleText); but if I have four spaces, I am left with