Re: escaping line brakes

From: Date: Wed, 17 Jul 2002 01:31:20 +0000
Subject: Re: escaping line brakes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20585@lists.php.net to get a copy of this message
In article <20020716124313.65449.qmail@pb1.pair.com>, news.letters@gmx.de says... > Hi there, > > I am putting text into a mysql db from a form field. I do include the > linebrakes with line2br. > > Now I would like to create an interface where I could load the text into the > form again to edit it. Unfortunatelly it includes some wired chars like \br > into the text. How can I get rid of that? > > Thanx for any help, > > Andy It sounds like you are using nl2br to all breaks _before_ you insert your data into a table. Don't do this, for this very reason. Only use nl2br _after_ you extract the data to format it for display in a browser; you don't need to use nl2br to display the data in a <TEXTAREA> of course. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#20585) next »