Re: end of line
| From: | Torsten Roehr | Date: | Mon, 30 Aug 2004 10:34:44 +0000 |
| Subject: | Re: end of line | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35939@lists.php.net to get a copy of this message | ||
"Marcjon" <marcjon@fastmail.fm> wrote in message
news:1093844358.24698.203307089@webmail.messagingengine.com...
> Try this:
> echo str_replace ( "\n", "<p>", $string);
>
> I believe it always stores newlines as \n, since PHP and MySQL are
> native to Unix/Linux.
> --
> Marcjon
Or use the PHP built-in function nl2br():
http://de3.php.net/manual/en/function.nl2br.php
Regards, Torsten Roehr