Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml and php

Status
Not open for further replies.

lenelene

Programmer
Dec 10, 2002
57
0
0
MY
i have problem.i have this textarea input.when it is display in the xml,it is display in one line and dont have the paragraph..how to enable it to displayed in paragraphs if the data is in paragraph when the user enter data in the textarea?$HTTP_POST_VARS["content"] is the user input for the content




header("Content-type: text/xml");


echo "<?xml version=\"1.0\" encoding=\"windows-874\"?>\n";
?>
<News xmlns:Nation="


<?php

?>



<NewsItemApple>
<headlineApple><?php echo $HTTP_POST_VARS["headline"]; ?></headlineApple>
<newscontent><?php echo $HTTP_POST_VARS["content"]; ?></newscontent>


</NewsItemApple>
<?php

?>
</News>
 
it works when use nl2br()but the problem it is display <br> in the xml output..i dont want the <br> display in the output..only want it to have new line and not show the coding as well
 
Did you try the <pre> tag, as ericbrunson advised?
Ps. if you are to use <br>, you need to use <br />, since all tags in xml/xhtml MUST be closed!


Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top