Re: \n and <br>
| From: | Eugene Lee | Date: | Mon, 10 Nov 2003 23:58:28 +0000 |
| Subject: | Re: \n and <br> | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169102@lists.php.net to get a copy of this message | ||
On Mon, Nov 10, 2003 at 06:57:54AM -0800, Chris Shiflett wrote:
:
: --- PHPLover <phplover@hotmail.com> 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).