On Mon, 9 Jun 2003, Charles Kline wrote: > Yes. Is weird. I thought this would work too, but for some reason it > was not removing them all. I wonder if re-saving the files with UNIX > linebreaks (or try DOS) would have any effect. Will report back.
$str = str_replace (array("\r", "\n"), '', $str); Regards, Philip > > On Monday, June 9, 2003, at 02:24 AM, Joe Pemberton wrote: > > > http://www.php.net/str_replace > > > > $newstr = str_replace("\n", "", $oldstr); > > > > ----- Original Message ----- > > From: "Charles Kline" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, June 08, 2003 10:44 PM > > Subject: [PHP] stripping newlines from a string > > > > > >> Hi all, > >> > >> How would i go about stripping all newlines from a string? > >> > >> Thanks, > >> Charles > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php