Limit the number of RSS feed to fetch
问题 I need help with the code of the RSS reader i'm testing on my site, the script work fine but it show 20 feed and i wanted to limit it to a number i set (like 3 or 6 for example). The code it's this: <?php //Feed URLs $feeds = array( "https://robertsspaceindustries.com/comm-link/rss", ); //Read each feed's items $entries = array(); foreach($feeds as $feed) { $xml = simplexml_load_file($feed); $entries = array_merge($entries, $xml->xpath("//item")); } //Sort feed entries by pubDate usort(