diff --git a/epub.php b/epub.php index 562347c..1ab6535 100644 --- a/epub.php +++ b/epub.php @@ -396,7 +396,7 @@ $xml = new SimpleXMLElement($feed); $items = $xml->xpath("/rss/channel/item"); - foreach ($items as $item) + foreach (array_reverse($items) as $item) { add_mp_article($item->link, $context, $epub); } @@ -518,7 +518,7 @@ $xml = new SimpleXMLElement($feed); $items = $xml->xpath("/rss/channel/item"); - foreach ($items as $item) + foreach (array_reverse($items) as $item) { $title = $item->title; $author = $item->xpath('dc:creator')[0];