aruncourage Posted May 3, 2010 Share Posted May 3, 2010 Dear friends.. i wants to make the rss feed in my website.... I had written the code just below here.. <?php include('db.php'); header('Content-type: application/xml'); echo '<xml version="1.0" encoding="UTF-8">'; $query=mysql_query("select * from smarty1"); while($fetch=mysql_fetch_array($query)) { echo '<name>'; echo $fetch[Name]; echo '</name>'; echo '<regno>'; echo $fetch[regnum]; echo '</regno>'; } ?> and the database connected properly but i got the error XML Parsing Error: no element found Location: http://snstr10/trainees/arun/rssfeed/ Line Number 3, Column 1: Please help me where i did the mistake? > Link to comment https://forums.phpfreaks.com/topic/200531-rss-feed-error/ Share on other sites More sharing options...
Deoctor Posted May 3, 2010 Share Posted May 3, 2010 change ur xml line to something like this echo "<xml version=\"1.0\" encoding=\"UTF-8\">\n"; Link to comment https://forums.phpfreaks.com/topic/200531-rss-feed-error/#findComment-1052267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.