php and xml

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
firestar_lene
Forum Newbie
Posts: 10
Joined: Mon Mar 29, 2004 2:04 am

php and xml

Post 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]
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post 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...
firestar_lene
Forum Newbie
Posts: 10
Joined: Mon Mar 29, 2004 2:04 am

still got problems

Post by firestar_lene »

ok..thanks for the reply,,but i still have problem..it is still dispaying in oneline
Post Reply