Re: [PHP] problems with replacing line breaks

2002-03-01 Thread Tyler Longren
why don't you just use the nl2br() function? Tyler - Original Message - From: "Tom Kincaid" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 9:11 AM Subject: [PHP] problems with replacing line breaks > I'm trying to replac

[PHP] problems with replacing line breaks

2002-03-01 Thread Tom Kincaid
I'm trying to replace line breaks with html code and am having problems. For single lines preg_replace("/\n/","",$text) or ereg_replace("\n","",$text) adds the but doesn't remove the line break. While preg_replace("/\n\n/","",$text) doesn't find any double line breaks, even though they're ther