RE: [PHP-DB] escaping line brakes

From: Date: Tue, 16 Jul 2002 13:08:23 +0000
Subject: RE: [PHP-DB] escaping line brakes
Groups: php.db 
Request: Send a blank email to php-db+get-20575@lists.php.net to get a copy of this message
> From: Andy [mailto:news.letters@gmx.de] > Sent: Tuesday, July 16, 2002 2:45 PM > 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? When did you use nl2br() (which I assume you mean)? Before you store the the data in the database or when you retrive it? If before then use echo str_replace("<br />", "\n", $your_string) If when you retrieve the data for output to the form, then just don't use nl2br(). Regards Joakim Andersson > > Thanx for any help, > > Andy

« previous php.db (#20575) next »