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

Answer by AbraCadaver for How do I make PHP display new lines from an XML file?

$
0
0

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 />";

Viewing all articles
Browse latest Browse all 3

Trending Articles



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