graham23s Posted April 18, 2009 Share Posted April 18, 2009 Hi Guys, i have made a basic rss feed in PHP but i get the error: An invalid character was found in text content. Line: 60 Character: 92 Ingredients per 0.6ml: Yellow to orange liquid containing - Vitamin C (Ascorbic Acid) 40mg ^ the above is line 60, my code for looping the data from mYSQL is: while($result = mysql_fetch_array($doGet)){ ?> <item> <title><?php echo htmlentities(strip_tags(($result['product_name']))); ?></title> <description><?php echo htmlentities(strip_tags($result['product_description'],'ENT_QUOTES'));?></description> <link>http://www.site.co.uk/product-information.php?id=<?php echo $result['id'];?></link> <pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $result['pubDate']); ?></pubDate> </item> <?php } ?> is there something else i need to do to the data to make it usable? thanbks for nay help guys Graham Link to comment https://forums.phpfreaks.com/topic/154662-rss-feed-error/ Share on other sites More sharing options...
soak Posted April 18, 2009 Share Posted April 18, 2009 You've got bad characters in your data: http://validator.w3.org/feed/ This is likely a charset issue in that your feed is being interpreted as UTF-8 when you're displaying data that contains windows-1252 or iso iso-8859-1 Link to comment https://forums.phpfreaks.com/topic/154662-rss-feed-error/#findComment-813322 Share on other sites More sharing options...
graham23s Posted April 18, 2009 Author Share Posted April 18, 2009 thanks mate sorted Graham Link to comment https://forums.phpfreaks.com/topic/154662-rss-feed-error/#findComment-813341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.