Remove mess in RSS parser

This commit is contained in:
Mohamad Damaj 2023-07-12 22:40:06 +03:00
parent 9aca27dc05
commit 8fcce83abd
1 changed files with 1 additions and 6 deletions

View File

@ -24,12 +24,7 @@ $xml = simplexml_load_file($feed);
// Get all items as an array
$items = iterator_to_array($xml->channel->item);
// Sort the items by pubDate
usort($items, function($a, $b) {
return strcmp($a->pubDate, $b->pubDate);
});
// Loop through the sorted items and display them
// Loop through the items and display them
foreach ($items as $item) {
// Add a box around the article
echo '<div class="article-box">';