Reply to Re: preserving line breaks in mysql

Your name:

Reply:


Posted by Stefan Rybacki on 07/24/05 18:47

meltedown wrote:
> 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".
>
>>

Post example code that produces this behaviour!

Regards
Stefan

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация