↧
Answer by Nicholas Summers for How do I make PHP display new lines from an...
You could capture the content in a variable first and then run:$nolines = str_replace(array("\n", "\r"),'<br>', $var);
View ArticleAnswer by AbraCadaver for How do I make PHP display new lines from an XML file?
Newlines have no meaning in rendered HTML. To break to the next line you use <br> or <br /> so use:echo nl2br($comment);Or in cases where there is no newline:echo "$comment<br />";
View ArticleHow do I make PHP display new lines from an XML file?
I use simplexml_load_file to open a soap envelope. When I get to one of the elements of the body, which contains plain text with new lines, and I want to display it, it's displayed without the new...
View Article