I'm importing an RSS feed with SimpleXMLElement
in PHP. I'm having trouble with the title and description. For some reason, the website I get the feed from puts the title and description in <![CDATA[...]]>
:
<item>
<title><![CDATA[...title...]]></title>
<link>...url...</link>
<description><![CDATA[...title...]]></description>
<pubDate>...date...</pubDate>
<guid>...link...</guid>
</item>
When I do a var_dump()
on the SimpleXMLElement, I get (for this part):
[2]=>
object(SimpleXMLElement)#5 (5) {
["title"]=>
object(SimpleXMLElement)#18 (0) {
}
["link"]=>
string(95) "...link..."
["description"]=>
object(SimpleXMLElement)#19 (0) {
}
["pubDate"]=>
string(31) "...date..."
["guid"]=>
string(48) "...link..."
}
How can I get the value in <![CDATA[...]]>
to read the title and description from the feed?