Hey Craig,
I just want to confirm what you're trying to achieve. Do you want to remove all of the opening / closing p tags from a bock of text, and replace them with line breaks? Or do you want to add the class text to each p tag in the block?
I'm wondering if there is a simpler way to do this using CSS instead of doing a find and replace with PHP. Perhaps wrapping the content with a div instead of a p tag, then styling the p tags inside the div instead would work?
Cheers,
Greg
Greg Thomas
PHP Programmer - interactivetools.com