Re: Large text fields

From: Date: Thu, 02 Nov 2000 01:40:31 +0000
Subject: Re: Large text fields
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-23292@lists.php.net to get a copy of this message
On Wed, Nov 01, 2000 at 06:21:17PM -0800, Claus Nybo wrote: > This all works fine, except for the text of the article itself. When the > text is typed in to the textfield on the form, it exist of several > paragraphs, with blank lines in between, but when it is viewed from the > database on another page all the paragraph breaks and blank lines are gone, > and all the text is displayed in just one long continued block. What you are seeing is that HTML doesn't use plaine newlines and empty lines for its formatting. While the source of your page will display that the text indeed still has its linebreaks in place, your browser will display it as one long continious piece of text. A solution to this would be to replace all linebreaks with <BR> or <P></P> tags before storing the textfield in the database or after pulling it out of the database. -- Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.16 is up 26 days, 16:19 http://uss-centauris.org/ | Reporter: Mr Gandhi, what do you think of Phone: (+31) 70 3467809 | Western Civilization? Cellular: (+31) 6 22091723 | Gandhi: I think it would be a good idea.

« previous php.general (#23292) next »