$clean = str_replace("\n\r\n", "<"p>", $text);
$clean = nl2br($clean);
Though the nl2br() function is quite misleading since it doesnt remove the \n, it just adds an <br /> So you can choose which method is best for you.
$text = str_replace("\n", "<br>", $text);
$text = str_replace("<br>", "\n", $text);