@tedd: Its just another way of looking at the things. Putting HTML into the DB is not really wrong (perhaps in this context it is). If you do have HTML in the DB, you can directly echo it out and use CSS to style it accordingly. Just my 2 cents. :) -Sterex On Fri, May 15, 2009 at 8:24 PM, tedd <tedd.sperling@xxxxxxxxx> wrote: > At 7:22 AM -0700 5/15/09, PHPScriptor wrote: > >> Well, the problem is that I have a lot of forms, a lot of data to output, >> and >> even then, I don't know always where I have a textarea or just a >> inputfield. >> But true, I could even set the nl2br on an input field, it wouldn't make a >> difference. >> But I just don't understand why this problem exists? What's the reason? >> > > > Simply, the problem deals with how different systems handle the "end of > line" (EOL) character? > > You can read more about it here: > > http://en.wikipedia.org/wiki/Newline > > What you've encountered (IMO) is just another extension/example of the > problem. > > Now, your choices are to: > > 1. Listen to Rob (the wisest) and use the <pre> tag. > > 2. Listen to Stuart (the wisest) and use the nl2br() function > > 3. Listen to Sterex (IMO -- who is totally wrong) and put html in your > database; > > 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. > > Cheers, > > tedd > > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >