# How to add page numbers in Links

**URL:** <https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830>\
**Category:** programming\
**Created:** [February 20, 2020, 5:45am UTC](https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830 "2020-02-20T05:45:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sukhwinder\_Saini](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sukhwinder\_Saini](https://forum.kirupa.com/u/Sukhwinder_Saini)\
**Post date:** [February 20, 2020, 5:45am UTC](https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830/1 "2020-02-20T05:45:05Z")

</div>

I have multiple RSS feed links like:  
[https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/k0c5l9004](https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/k0c5l9004)  
[https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-2/k0c5l9004](https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-2/k0c5l9004)  
[https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-3/k0c5l9004](https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-3/k0c5l9004)  
[https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-4/k0c5l9004](https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-4/k0c5l9004)  
[https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-5/k0c5l9004](https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/page-5/k0c5l9004)

How do i loop onto this links rather than defining in array. So i can just replace the page numbers. Here my code

```
$(document).ready(function() {

   var feed = "https://www.kijiji.ca/rss-srp-rideshare-carpool/ontario/rideshare/k0c5l9004";
    $.ajax(feed, {
        accepts:{
            xml:"application/rss+xml"
        },
        dataType:"xml",
        success:function(data) {
            $(data).find("item").each(function () {
                var el = $(this);
                console.log("------------------------");
                var titleU= el.find("title").text();
                var title= titleU.toLowerCase();
                var link= el.find("link").text();
                var description= el.find("description").text();
                console.log(title);
                console.log(description);
            });
        }   
    });
});
```

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [February 20, 2020, 6:00am UTC](https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830/2 "2020-02-20T06:00:35Z")

</div>

I don’t understand what you are trying to do 😛

You have five RSS feeds. Are you trying to figure out how to have your **feed** variable loop through each one and store all the results?

---

<div class="post-metadata">

**Author:** ![Sukhwinder\_Saini](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sukhwinder\_Saini](https://forum.kirupa.com/u/Sukhwinder_Saini)\
**Post date:** [February 20, 2020, 6:05am UTC](https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830/3 "2020-02-20T06:05:30Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [February 20, 2020, 6:08am UTC](https://forum.kirupa.com/t/how-to-add-page-numbers-in-links/641830/4 "2020-02-20T06:08:51Z")

</div>

You can have an array of all these feeds. At this point, it would just be you looping through each feed and calling a function that reads your current feed’s contents.
