How to get content-Element from XML rss feed using PHP?
95
how can I get the content-Element from XML? Other solutions on stackoverflow could not help me, I'm doing something wrong.. This is how I read the feed:
<?php
$content = file_get_contents('some feed url');
$x = new SimpleXmlElement($content);
foreach($x->channel->item as $entry) {
$chi = $entry->children('content', true)->encoded;
}
?>
Answer
Solution:
Try following code: