Code: Select all
<?php
$xml = new SimpleXMLElement('http://www.example.com/feed/', null, true);
echo $xml->channel->item->title[0];
?>On the feed itself it looks fine, but the above code outputs (notice the odd characters) :
Code: Select all
LOL Monday – Selective LudditeI thought I had this issue before and the solution was to use utf-8 character encoding, so I tried specifying it using both an html doctype and header() - neither worked. When I view the source of the XML document it has:
Code: Select all
<title>LOL Monday – Selective Luddite</title>