Php Rss feed use img in CDATA -> content:encoded
I need to display only the image from the CDATA content. <item> <title>... </title> <link>... </link> <description>... </description> <category>... </category> <pubDate>... </pubDate> <guid>... </guid> <content:encoded><![CDATA[<a href="..."><img alt="" src="..."/></a>...]]></content:encoded> <enclosure url="..." type="image/jpeg" length="171228"></enclosure> </item> my code i tried looks like this an works fine for the part <?php $html = ""; $url = "http://www...."; $xml = simplexml_load_file($url); for($i = 0; $i < 1; $i++){ //works fine with <description> part $description = $xml->channel-