feed = $feed; }
function parse(){
$rss = simplexml_load_file($this->feed);
$rss_split = array();
foreach ($rss->channel->item as $item) {
$title = (string) $item->title; // Title
$images = (string) $item->image; // Title
$link = (string) $item->link; // Url Link
$description = (string) $item->description; //Description
$des = ""; //Initialize
/*$arr = explode(" ", str_replace(",", ", ", $description));
for ($index = 0; $index < 50; $index++) {
$des .= $arr[$index]. " ";
}*/
$rss_split[] = '
';
}
return $rss_split;
}
function display($numrows,$head)
{
$rss_split = $this->parse();
$i = 0;
$rss_data = '';
while ( $i < $numrows )
{
$rss_data .= $rss_split[$i];
$i++;
}
$trim = str_replace('', '',$this->feed);
$user = str_replace('&lang=en-us&format=rss_200','',$trim);
$rss_data.='';
return $rss_data;
}
}
$feedlist = new rss('https://ekwadesign.com/kick-off-team/dr-menkes-new/blog/chemical-peels/feed/');
echo $feedlist->display(20,"Read More Articles");
?>