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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to