>>741
要するにこういうこと?

$str = preg_replace(array("/[\n]{2,}/", "/[\n]/"), array("</p><p>", "<br />"), $str);
$str = "<p>$str</p>";