<?php $text = '<p>my text 1</p> some other content <p>some other paragraph followed by an html line break</p><br> etc...'; $text = nl2br($text); $regex= '#<\/p>(<br\s?\/?>)#'; $text = preg_replace($regex, '</p>', $text); echo $text;
You have javascript disabled. You will not be able to edit any code.