Converting paragraph tags with RegEx
- by Joel
I need to replace all <p> tags with <br /> tags within a string.
The problem is that the <p> tag can have attributes in it , such as <p align="center"> so I want to delete all occurrences of an opening tag of a paragraph, no matter what attributes are in it, and replace them with <br />.
I am using PHP and had no success getting to the right expression with the preg_replace function.
Any help would be appreciated!
Joel