PHP Substituir n por
$var = str_replace(array("\r\n","\n"),'<br>', $var);
adriendums
$var = str_replace(array("\r\n","\n"),'<br>', $var);
echo str_replace("<br>", " ", $mystringwithbrs);