Hi
I'm working on a bit of code that handels RSS. no mater what i do it always ends with an error. Any help?
<?php
// Require the database class
require_once('includes/DbConnector.php');
// Create a new DbConnector object
$connector = new DbConnector();
header('Content-type: application/xml');
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>
<rss version="2.0"<!-- -->
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>RSS Feed title</title>
<link>EXAMPLE.com</link>
<description>A small CMS/description>
<copyright>
My Work, my rules!
</copyright>
<?php
// Execute the query to retrieve articles
$result = $connector->query('SELECT ID,title FROM cmsarticles ORDER BY ID DESC LIMIT 0,2');
while ($row = $connector->fetchArray($result))
{
?>
<item>
<title><?php $row['title'];?></title>
<description><?php $row['thearticle'];?></description>
<link><?php $row['ID'];?></link>
</item>
}
</channel>
</rss>
}
Thanks!