try this function
nltobr()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
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
6 matches
Mail list logo