Can someone point out why extra <p></p> tags are being inserted at the end of each paragraph? Here is my code:

$paragraphTags = str_replace("\n", "</p>\n<p>", '<p>'.$testimonialText.'</p>');


Here is the result:

<p>This is a follow-up to the bulletin we sent on September 12. It has come to our attention that some merchants may have received emails where the sample code snippets had syntax errors. We would like to apologize for the inconvenience and make sure we publish the corrected code snippets. Additionally, some merchants reported that their IPN scripts updated to use HTTP 1.1 get "hung" or take a long time to get a ‘VERIFIED’ response. We are including instructions on how to remedy this issue as well by adding "Connection: close” header in the HTTP request.
</p>
<p>
</p>