note 71305 deleted from function.wordwrap by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:30:44 +0000 |
| Subject: | note 71305 deleted from function.wordwrap by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155128@lists.php.net to get a copy of this message | ||
Note Submitter: austinbarton at gmail dot com
----
In response to some of the alternative wordwrap functions that attempt to work with HTML:
They do not work with anything that uses <br> or <p> to force breaks. This occurs as the
replacement text does not match the original as it is not breaking up words appropriately.
The solution is to ignore formatting tags in the strip_tags function call ie:
strip_tags( $string, '<br>' );