// To remove it, simply replace it with an empty string like this :
$str = str_replace("\n", "", $str);
//Also, if you want it to be reflected in your HTML you should replace the \n with <BR>.
$str=nl2br($str);
//Or
$str = str_replace("\n", "<BR>", $str);