Answers for "php replace \n"

PHP
2

php replace \n by <br>

$var = str_replace(array("\r\n","\n"),'<br>', $var);
Posted by: Guest on November-01-2020
5

php replace return character

$string = str_replace("\n", "", $string);
$string = str_replace("\r", "", $string);
Posted by: Guest on May-14-2020
32

php replace

str_replace ($search, $replace, $subject);
Posted by: Guest on June-17-2019
0

nl2br() php

// add to the functions file
function translateLineBreaks($string) {
	$result = nl2br ($string);
  	return $result;
}
Posted by: Guest on July-26-2020

Browse Popular Code Answers by Language