Can someone please post here a function/ regular expression supporting converting <br> tags to new line characters.
That means inverse of nl2br().
Thanks and Best Regards[/quote]
[code=php]function br2nl($string) { return preg_replace('/<br(s*)?/?>/i', "n", $string); }[/code]note: the replacement string is followed by n for a newlines char.
@NogDogAug 24.2009 — #Functionally the same as above, just removing a few key-strokes. ? [code=php] return preg_replace('#<brs*?/?>#i', "n", $string); [/code]