i try to get comment count from a blog post use blog feed. i want to get number inside
<slash:comments>0</slash:comments>
i use this syntax but did not work:
<?php
$feed = file_get_contents("http://www.trenologi.com/feed/");
$xml = new SimpleXmlElement($feed);
foreach($xml->channel->item as $entry) {
$comment = mysql_real_escape_string("$entry->slash:comments");
echo "$comment";
}
?>
i think the error is $entry->slash:comments
, what must i write to change slash:comments
to get comment count?
thank you daniweb friends.