Hello Sitepoint Lovely People,

I just started learning how to make a RSS feed.
Although I have successfully made 1, but the words are ALL OVER THE PLACE
------------------------------------------------------------
SCREENSHOT


------------------------------------------------------------
Usually, I use the <pre></pre> html tags to ensure it displays properly in my normal webpage.

but now that it is in XML, ..... how do I make all the formatting back to normal ?

My rss.php file looks is as below
PHP Code:
<? header('Content-type: text/xml'); ?>

<rss version="2.0">
<channel>
<title>Subscription</title>
<description>Profile</description>
<link>http://mysite.com/</link>

<?
$con = mysql_connect("localhost","abc","123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("MYdb", $con);

$result = mysql_query("SELECT * FROM joke WHERE username = '" . $_GET['username'] . "' ORDER BY `id` DESC LIMIT 0, 5 ");

while($row = mysql_fetch_array($result)){

?>
      <item>
        <title> <?=htmlentities(strip_tags($row['title1'])); ?></title>
        <description><?=htmlentities(strip_tags($row['main1'],'ENT_QUOTES'));?></description>
        <link>http://mysite.com/joke2.php?id=<?php echo $row['id'];?></link>
</item>
<? } ?>
</channel>
</rss>
Thanks for the advice.