php replace \n code example
Example 1: php replace return character
$string = str_replace("\n", "", $string);
$string = str_replace("\r", "", $string);
Example 2: php replace
str_replace ($search, $replace, $subject);
Example 3: nl2br() php
// add to the functions file
function translateLineBreaks($string) {
$result = nl2br ($string);
return $result;
}