(.*?)#is',$content,$match); $live_html = ''; $starts_html = ''; $results_html = ''; $live_match_html=''; $live_match_update_html= ''; $count = 0; foreach ($match[1] as $k=>$v){ $json = json_decode($v,true); if($json['@type'] == "Event"){ if($json['eventStatus'] == "In Progress"){ $live_html .= '
'.$json['name'].' Live
'; $count++; if($count == "1"){ $active = " active"; }else{ $active = ""; } $name_explode = explode("vs",$json['name']); $team1 = strtoupper(substr(trim($name_explode[0]), 0,3)); $team2 = strtoupper(substr(trim($name_explode[1]), 0,3)); $teams = $team1." vs ".$team2; $live_match_html .= '
  • '.$teams.'
  • '; $live_match_update_html .= '

    '.$json['description'].'

    '; } if($json['eventStatus'] == "Scheduled"){ $starts_html .= '

    '.$json['name'].'

    Match yet to begin

    '.gmdate("D M j, Y, g:i a", strtotime($json['startDate'])).' GMT

    '; } if($json['eventStatus'] == "Finished"){ $results_html .= '

    '.$json['name'].'

    '.$json['description'].'

    '.gmdate("D M j, Y, g:i a", strtotime($json['startDate'])).' GMT

    '; } } } $content = file_get_contents_curl('https://www.espncricinfo.com/rss/content/story/feeds/0.xml'); $news_html = ''; $x = new SimpleXmlElement($content); $newsc = 1; foreach($x->channel->item as $entry){ $news_html .= '

    '.$entry->title.'

    '.$entry->description.'

    '.date("F j, Y", strtotime($entry->pubDate)).'

    '; if($newsc == "4") break; $newsc++; } ?> Cricket Live Score

    Latest News

    channel->item[0]->title; ?>
    channel->item[0]->description; ?>
    channel->item[1]->title; ?>
    channel->item[1]->description; ?>
    channel->item[2]->title; ?>
    channel->item[2]->description; ?>
    channel->item[3]->title; ?>
    channel->item[3]->description; ?>