Re: Stripping carriage returns

From: Date: Tue, 11 Jan 2011 19:23:24 +0000
Subject: Re: Stripping carriage returns
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310675@lists.php.net to get a copy of this message
On Tue, Jan 11, 2011 at 14:13, Richard S. Crawford <richard@underpope.com> wrote: > > $content = str_replace(chr(13),$content) > > and > > $content = str_replace(array('\n','\r','\r\n'),$content) Neither of these have replacement values, which might just be a typo. However, the larger issue is in the single (literal) quotes in the second example. Change that to: $content = str_replace(array("\n","\r","\r\n"),'',$content); If you're ambitious, you can try the FileConv PHP extension available here: http://links.parasane.net/dxdv -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/

« previous php.general (#310675) next »