PHP, nl2br except between HTML tags?
How would I write a PHP function to use nl2br except between any two HTML tags? For example, the following:
Code:
Blah, blah, blah. Here is some text. |
I can't think of any good (emphasis on that 'good') way to do this except through using a full-blown HTML parser. Perhaps it may be easier to just amend the database tables so they have the <br/> in them already?
|
All times are GMT -5. The time now is 02:16 AM. |