Page 1 of 1

php and xml

Posted: Thu Oct 21, 2004 4:30 am
by firestar_lene
feyd | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


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

Code: Select all

<?php

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


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

?>



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

feyd | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Thu Oct 21, 2004 4:38 am
by mudkicker
you have to use some string functions to edit its output.
for example, [php_man]nl2br[/php_man]() may work...

and please color your code...

still got problems

Posted: Thu Oct 21, 2004 8:50 pm
by firestar_lene
ok..thanks for the reply,,but i still have problem..it is still dispaying in oneline