Quantcast
Channel: How do I make PHP display new lines from an XML file? - Stack Overflow
Browsing all 3 articles
Browse latest View live

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 Article


Answer 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 Article


How 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
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>