David T-G wrote: > > Rob, et al -- > > ...and then Robert Cummings said... > % > % Actually on second thought... and I don't know why I went with the > > *grin* > > % crowd in the first place... I do the following: > % > % $foo = "I don't like\nnewlines"; > % > % $foo = str_replace( "\n", '<br />', $foo ); > % > % That one work for you? It's more efficient too. > > Actually, no. I thought about listing all of the things I had tried (and > ereg_replace wasn't one of 'em) in my post but didn't want to clutter > things up. I've tried str_replace, preg_replace, and now ereg_replace, > and have tried working on the function extraction of the data directly as > well as the $fin and $fout separation. I always have the newline left > behind. > > I'm a [rusty] perl guy, and so I keep wanting to know what's the magic > variable in PHP to set to make it eat entire paragraphs, like $/ or such > in perl (there's where the rusty part comes in!). If these functions are > just operating on a single line then the newline(s) won't get eaten.
*ACK* Stoopid microsoft... it's the "\r" character I bet. Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php