Re: [PHP] \n to Problem

2002-09-09 Thread yasin inat
try this function nltobr() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] \n to Problem

2002-09-07 Thread Justin French
on 07/09/02 1:51 AM, N. Pari Purna Chand ([EMAIL PROTECTED]) wrote: > $newstr = ereg_replace ("\n", "", $newstr); Instead, I think you'd have to escape the slash: "\\n"... but it's irrelevant, because there's a function that does this for you: $newstr = nl2br($newstr); Also, you should try to

Re: [PHP] \n to Problem

2002-09-06 Thread Jacob Miller
At 23:51 09/06/2002, you wrote: >I have a small problem in converting a plain text to html. >$newstr = ereg_replace ("\n", "", $newstr); try $newstr = ereg_replace("\n\r|\n|\r", "", $newstr); notice it looks for all types of line feeds -jacob -- PHP General Mailing List (http://www.php.n

Re: [PHP] \n to Problem

2002-09-06 Thread Jacob Miller
At 23:51 09/06/2002, you wrote: >I have a small problem in converting a plain text to html. >$newstr = ereg_replace ("\n", "", $newstr); try $newstr = ereg_replace("\n\r|\n|\r", "", $newstr); notice it looks for all types of line feeds -jacob -- PHP General Mailing List (http://www.php.n

Re: [PHP] \n to Problem

2002-09-06 Thread David T-G
Chandu, et al -- ...and then N. Pari Purna Chand said... % % I have a small problem in converting a plain text to html. Son of a gun... Maybe it's world consciousness working on this :-) I've just posted a similar question. Be sure to watch both threads just in case. HTH & HAND :-D -- Da

[PHP] \n to Problem

2002-09-06 Thread N. Pari Purna Chand
I have a small problem in converting a plain text to html. say $text = "PHP Rocks"; Observe the '\n', When I call the converttohtml function which I wrote ( see bottom ) $html = converttohtml($plaintext); The $html I'm getting is "PHP Rocks"; Observe the '\n' still exists, What is the way to