Re: textarea new line to mysql database

From: Date: Fri, 15 May 2009 16:28:39 +0000
Subject: Re: textarea new line to mysql database
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-292639@lists.php.net to get a copy of this message
At 11:19 AM -0400 5/15/09, Robert Cummings wrote:
On Fri, 2009-05-15 at 10:54 -0400, tedd wrote: 4. Or, listen to me (who is somewhere between Rob/Stuart and Sterex)
and use either the <pre> tag or the nlbr() function depending upon what you want to do with the output. Both solutions [1 and 2] provide different ways to handle data. Number [3] simply creates another problem you, or someone else, will have to deal with later on.
Actually, after reading the other posts with respect to what he's trying to do, I would use nl2br() unless I specifically needed <pre></pre>. Cheers, Rob. --
That would be my first choice as well. However, one can style a <pre> tag whereas it's very difficult (if not impossible) to style what goes in between <br /> tags. Also, one can generate validation errors using "<br />" because there are three different varieties of the tag, namely "<br>", "<br />", and "<br/>" -- all of which can be used in different settings. I don't remember which doctypes go with which version (xhtml requires />), but I've run into that problem before. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#292639) next »