Reply to Re: Formatting the contents of a text area form field

Your name:

Reply:


Posted by Charlie King on 01/15/06 18:22

On 15 Jan 2006 04:57:20 -0800, in
<1137329840.465536.212360@z14g2000cwz.googlegroups.com>
(comp.lang.php) "monomaniac21" <marcrice20@msn.com> wrote:

> Hi all
>
> On my site I get users to enter a load of information in a textarea
> box, however when i save this data to my mysql DB and then retrieve it,
> it comes out without all the formatting, like new paragraphs and new
> lines.
>
> Can anyone tell me how you can capture the data entered into such a
> field with all the formatting the user has entered like new paragraphs
> etc?

You could try nl2br();
http://fr.php.net/manual/en/function.nl2br.php

e.g.

echo nl2br($bigFieldFromDatabase);
--
Charlie

[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

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