note 21031 deleted from function.nl2br by aidan
| From: | aidan@php.net | Date: | Sun, 10 Oct 2004 10:39:22 +0000 |
| Subject: | note 21031 deleted from function.nl2br by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78284@lists.php.net to get a copy of this message | ||
Note Submitter: steveua at yahoo dot com
----
In reference to s_vunckx@hotmail.com's problem --
I gather that you are experiencing the < br /> multiplying effect when modifying content that
has previously passed through a nl2br(). Just use a strip_tags() on the variable/text that you are
attempting to modify, before it reaches the browser form field in which it will display.
This will remove all <br /> tags prior to viewing in the browser form field (however,
corresponding newlines and returns will still be there). Then, simply pass the same var through
another nl2br() prior to sending the var back to your database or textfile.