toxictoad Posted September 22, 2008 Share Posted September 22, 2008 Hi I'm getting an error when I run my code the error is here: echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; I ran the page through the w3c validator and it points to the last " as being wong? this is the full code <?php header("Content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; // Set RSS version. echo " <rss version=\"2.0\"> "; // Start the XML. echo " <channel> <title>This is the title</title> <description>Information to describe the overall content of this feed</description> <link>http://www.phatjoints.com/</link>"; // Create a connection to your database. require("config.php"); // Query database and select the last 10 entries. $data = mysql_query("SELECT * FROM rssnews ORDER BY id DESC LIMIT 10"); while($row = mysql_fetch_array($data)) { // Continue with the 10 items to be included in the <item> section of the XML. echo " <item> <link>http://www.phatjoints.com/rsstest.php?id=".$row[id]."</link> <guid isPermaLink=\"true\">http://www.phatjoints.com/rsstest.php?id=".$row[id]."</guid> <title>".$row[Title]."</title> <description><![CDATA[".$row[Content]."]]></description> <comments>http://www.phatjoints.com/rsstest.php?id=".$row[id]."#Comments</comments> </item>"; } echo " </channel> </rss>"; ?> anyone help? Link to comment https://forums.phpfreaks.com/topic/125371-solved-small-problem-rss-feed-not-validating/ Share on other sites More sharing options...
toxictoad Posted September 22, 2008 Author Share Posted September 22, 2008 wasn't the " it was the file type Link to comment https://forums.phpfreaks.com/topic/125371-solved-small-problem-rss-feed-not-validating/#findComment-648178 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.