Код: Выделить всё
$itsw_rss_feed = simplexml_load_file($itsw_feedurls[wp_rand(0,count($itsw_feedurls) - 1)]);
Код: Выделить всё
if (!empty($itsw_rss_feed)) {
$i = 0;
foreach ($itsw_rss_feed->channel->item as $itsw_feed_item) {
if ($i >= 190) break; { $itsw_totalrecords[$i] = [$itsw_feed_item->link, array_slice(explode('
', $itsw_feed_item->description), 0)[0], $itsw_feed_item->title, substr(array_slice(explode('', $itsw_feed_item->description), 0)[1], 0, -7)]; }
$i ++; }
Код: Выделить всё
shuffle($itsw_totalrecords);
Подробнее здесь: https://stackoverflow.com/questions/798 ... n-xml-feed
Мобильная версия