Hi!
i have a xml like this:
<cont><?php echo nl2br($cont); ?></cont>
the response is:
<cont>
2<br/>
3<br/>
4<br/>
</cont>
in the page the code is:
mainParentElement = document.getElementById('div_cont');
RemoveAllChildElements(mainParentElement);
mainParentElement.innerHTML = "<div class=\'div_cont\'>" + xmlDoc.getElementsByTagName('cont')[0].childNodes[0].nodeValue + "</div>";
in this case the result in the div is only the first line. (2)
if i deleted the nl2br
the result is all the lines. (of course with out the <br>
)
how can i add the <br>
?
thank you!