Posted by meltedown on 07/24/05 17:50
bonfils wrote:
> "meltedown" <groups2@reenie.org> skrev i en meddelelse
> news:oJzEe.562187$iM6.132152@fe01.news.easynews.com...
>
>>I have a textarea in a form. When the value is added to a database, the
>>linebreaks are lost. How can I preserve them ?
>
>
> Depends on what you mean by "lost". The "linebreaks" you see in a textarea
> are in fact newline characters (\n) and are saved as such in the database.
> And newline characters are usually ignored in HTML.
> But - you can convert them with nl2br():
> http://dk2.php.net/manual/en/function.nl2br.php
> Hope this helps.
I'm talking about the "\n";
When I put "test\n" into the database, and then call up that field from
the database, I get "test".
>
[Back to original message]
|