Re: Forms and viewing Text Area

From: Date: Thu, 09 Dec 2004 23:03:18 +0000
Subject: Re: Forms and viewing Text Area
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-203875@lists.php.net to get a copy of this message
Ben C wrote:
I have a form which has a text box which then stores in MySQL. When I write seperate paragraphs and try and then view what I wrote it lumps it all together in one paragraph when I echo. I am sure I am doing something simply wrong. Anyone have any ideas?
The line breaks are preserved. If you look at the HTML source of your page, you'll see that. HTML does not render line breaks, though, you need <br /> tags. So using nl2br() or something similar would work. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#203875) next »