replace n with br php code example
Example 1: php replace \n by
$var = str_replace(array("\r\n","\n"),'<br>', $var);
Example 2: php replace string within string
$new_string = str_replace( $take_out, $put_in, $string);
$var = str_replace(array("\r\n","\n"),'<br>', $var);
$new_string = str_replace( $take_out, $put_in, $string);