advanced code snippet search
dmistriotis on 10/11/10
php String line newline
1 person have marked this snippet as a favorite
// 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);
Report this snippet
You need to login to post a comment.