Hi all, I found this tutorial on how to setup an RSS Feed made all the necessary changes, saved it and I'm getting an error when I tried to validate it.
This is the error
Suggesting that the last " before ; is wrong?Code:This feed does not validate. line 3, column 48: XML parsing error: <unknown>:3:48: syntax error [help] echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ^
This is the complete code, but the above was the only issue showing on the validator.
I'm going through various tutorials from different sites and they don't always fit together to well as I am new to it.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>"; ?>
Thanks for any help








Bookmarks