feed['news'][0]; # Format pubDate: Month day Year $latestNew['pubDate'] = date_create($latestNew['pubDate']); $latestNew['pubDate'] = $latestNew['pubDate']->format('M j Y'); # Add th for day $latestNew['pubDate'] = explode(' ', $latestNew['pubDate']); $latestNew['pubDate'][1] = "{$latestNew['pubDate'][1]}th"; $latestNew['pubDate'] = join(' ', $latestNew['pubDate']); // Remove the isolated "p" tag that contains an anchor tag with text "Source" from description. $latestNew['description'] = preg_replace('/