Eugene Lee wrote:

On Mon, Nov 10, 2003 at 06:57:54AM -0800, Chris Shiflett wrote:
: : --- PHPLover <[EMAIL PROTECTED]> wrote:
: >
: > is \n same as <br>
: : This is not true.
: : > I know that \n creates a break in source and not in display.
: > Is it possible to make \n does the same function as <br>
: : No, but you can convert your newlines to the HTML equivalent:
: : http://www.php.net/nl2br


Warning: nl2br() is not safe because it emits "<br />" tags which do not
always work on all browsers (especially browsers not explicitly advertised
to be XHTML-compliant).



If that is the case and you would not like the xhtml compliancy, then just do a str_replace('<br />','<br>',$data); after you do the nl2br, everything cured :)

Rolf Brusletto
http://www.phpExamples.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to