FORM text formatting problem

From: Date: Tue, 31 Dec 2002 05:44:01 +0000
Subject: FORM text formatting problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-129738@lists.php.net to get a copy of this message
Hi, When i retrieve the text i have on my database, which was taken from a form textbox, i have line breaks ate the end of each line in the textbox. Ah, hard to explain! My textbox is small, and everytime, while writing a text in it, the line ends and we continued writing on the next one, thats the formatting my text on the database gets. It doesnt recognize the line breaks we want (by pressing ENTER), but takes line breaks simply from reaching the end of the textbox. How can that be? Before i insert the text from the textbox into the database, i do this: $texto = str_replace("\r\n", "\n", $texto); $texto = str_replace("\r", "\n", $texto); And when i want to retrieve the text from the database to display it on the site, i do: $texto = str_replace("\n", "<br>", $texto); Some help, please? Pag

« previous php.general (#129738) next »