Line Breaks

From: Date: Fri, 23 Mar 2001 20:48:39 +0000
Subject: Line Breaks
Groups: php.db 
Request: Send a blank email to php-db+get-7729@lists.php.net to get a copy of this message
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 :)

« previous php.db (#7729) next »