I currently use $output = preg_replace('/>\s+</', "> <", $output) to strip whitespace between any two HTML tags. What can I do to strip whitespace only between paragraph tags. For example, only between </p> and <p> tags?
OK ... Strike all that. I'm going to use PHP's DOMDocument class instead to manipulate the HTML. Soooo here's what I need ... I need to loop through all HTML, and run nl2br() on everything within a <p> tag. Any takers?