Re: [php-list] Removing newline

2005-12-02 Thread Bob
Thanks Ian, That should do the trick nicely. Now why didn't I think of that (don't answer). - Original Message - From: "Ian Bambury" <[EMAIL PROTECTED]> To: Sent: Friday, December 02, 2005 10:35 AM Subject: Re: [php-list] Removing newline > Change \n\n to

Re: [php-list] Removing newline

2005-12-02 Thread Ian Bambury
ot;\n\n" > intact. > Unusual request, but it's for a text formatter. > > > - Original Message - > From: "Patrick Bierans" <[EMAIL PROTECTED]> > To: > Sent: Thursday, December 01, 2005 7:08 PM > Subject: Re: [php-list] Removing newline >

Re: [php-list] Removing newline

2005-12-01 Thread Bob
<[EMAIL PROTECTED]> To: Sent: Thursday, December 01, 2005 7:08 PM Subject: Re: [php-list] Removing newline > try this: > > $str=str_replace("\r","",$str); > $str=preg_replace("/\n([^n]+)/","$1",$str); Yahoo! Group

Re: [php-list] Removing newline

2005-12-01 Thread Patrick Bierans
try this: $str=str_replace("\r","",$str); $str=preg_replace("/\n([^n]+)/","$1",$str); Yahoo! Groups Sponsor ~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/HKFolB/TM --

[php-list] Removing newline

2005-12-01 Thread Bob
How can I remove "\n" from a text string, but without removing "\n\n", using preg_replace? Just can't get it to work. I'd prefer to use preg_replace(); instead of ereg_replace(); as that's what I've been concentrating on. Thanks. Yahoo! Groups Sponsor