Re: Retrieve Data Formated from Text field

From: Date: Sat, 29 Oct 2005 20:36:14 +0000
Subject: Re: Retrieve Data Formated from Text field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224815@lists.php.net to get a copy of this message
The data is inserted into db in this way: "Hello, This is a sample of first line. This is another paragraph, blah blah blah Bye" But the result is in one paragraph: "Hello, This is a sample of first line. This is another paragraph, blah blah blah Bye"
It sounds as if your database record includes a carriage return or new line character (\n), which is not recognized in html (except using the <pre> tag. You need to replace the new line with an html <p> tag. You might want to store each paragraph in a different database record (make a table for the text. It will include a key that connects it to the main record, the text, and a sequence number that tells you the order in which the paragraphs should be displayed). Linda H

« previous php.general (#224815) next »