RE: [PHP-DB] Line Breaks

From: Date: Fri, 23 Mar 2001 21:30:28 +0000
Subject: RE: [PHP-DB] Line Breaks
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7733@lists.php.net to get a copy of this message
nl2br() > -----Original Message----- > From: Shope, Glenn [mailto:glenn_shope@teamtki.com] > Sent: 23 March 2001 20:49 > To: 'php-db@lists.php.net' > Subject: [PHP-DB] Line Breaks > > > Still haven't figured it out... > > I have read several entries about preserving line breaks when displaying > text from a mySQL database, but I have had no success. > > How would I prevent data in a single field containing line breaks > from being > displayed in HTML as a single line? > > For example: > > A person fills out a form with this information: > > "My name is Chris. > > I like to swim." > > Ho do I prevent PHP from writing it as > > "My name is ChrisI like to swim." ??? > > > I have tried a EREG_REPLACE and PREG_REPLACE attempting to > replace "\n" with > <BR>, but it doesn't seem to do the trick. > > Any help would be greatly appreciated!! > > Glenn :) > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#7733) next »