Finding the previous and next links using SimpleXml


If you find yourself in a situation where you need to page through a large feed of entries with SimpleXML, you can use the below snippet to retrieve the 'previous' and 'next' links:
// assuming you have read your XML string into the $sxml object
$links = $sxml->children('http://www.w3.org/2005/Atom'); 
foreach($links as $link) {
  foreach($link->attributes() as $key => $value) {
    if ($key == 'rel') {
      print "$key => $value\n";
    }
  }
}

41 comments:

Dr. Nur said...

How do i add previous and next post to my blog. i cannot do it :(

obama said...

Soon as I get home, soon as I get home from work
Girl I’ll be around, never let you down
For all that it’s worth
I give good love (good love, good love, good love, good love)
I give good love (good love, good love, good love, good love)
perth strippersfree porn

JuliaFromTGR said...

Close your eyes, give me your hand, darlingDo you feel my heart beating
Do you understand
Do you feel the sameEscorts SydneyEscort Accompagnatrici

JuliaFromTGR said...

Do you understand
Do you feel the same
Am I only dreaming
Is this burning an eternal flameescorts sydneyshop sex

JuliaFromTGR said...

I believe it's meant to be, darling
I watch you when you are sleeping
You belong with me
Do you feel the samelive sexfree porn

JuliaFromTGR said...

You belong with me
Do you feel the same
Am I only dreaming
Or is this burning an eternal flamelivesexSydney Escorts

JuliaFromTGR said...

Say my name sun shines through the rain
A whole life so lonely
And then you come and ease the pain
I don't want to lose this feelingUK Escortfree porn

JuliaFromTGR said...

Close your eyes, give me your hand, dảlingDo you feel my heart beatingDo you understandDo you feel the samefree pornsydney escort

JuliaFromTGR said...

Close your eyes, give me your hand, darling
Do you feel my heart beating
Do you understand
Do you feel the samefree pornsydney escort

JuliaFromTGR said...

Do you understand
Do you feel the same
Am I only dreaming
Is this burning an eternal flameMelbourne EscortsEscort

JuliaFromTGR said...

I believe it's meant to be, darling
I watch you when you are sleeping
You belong with me
Do you feel the samesex videoLondon Escorts

JuliaFromTGR said...

I believe it's meant to be, darling
I watch you when you are sleeping
You belong with me
Do you feel the sameEscortweb cam chat

JuliaFromTGR said...

You belong with me
Do you feel the same
Am I only dreaming
Or is this burning an eternal flameproduto eroticoEscort Sydney

JuliaFromTGR said...

Ooh, if there's one thing I hang ontoThat gets me through the night
I ain't gonna do what I don't want to
I'm gonna live my lifecelebrity photosbest hgh

JuliaFromTGR said...

Close your eyes, give me your hand, darling
Do you feel my heart beating
Do you understand
Do you feel the sameLas Vegas Escortfree porn

JuliaFromTGR said...

Do you understand
Do you feel the same
Am I only dreaming
Is this burning an eternal flameLas Vegas Escortfree porn

JuliaFromTGR said...

I believe it's meant to be, darling
I watch you when you are sleeping
You belong with me
Do you feel the samefree webcamsVegas Escort

JuliaFromTGR said...

You belong with me
Do you feel the same
Am I only dreaming
Or is this burning an eternal flamecam chatVegas Escorts

JuliaFromTGR said...

You belong with me
Do you feel the same
Am I only dreaming
Or is this burning an eternal flameweb cam to camsydney escorts

JuliaFromTGR said...

Say my name sun shines through the rain
A whole life so lonely
And then you come and ease the pain
I don't want to lose this feelingfree webcamsVegas Escorts

JuliaFromTGR said...

Ooh, if there's one thing I hang onto
That gets me through the night
I ain't gonna do what I don't want to
I'm gonna live my lifechat sexfree porn

JuliaFromTGR said...

Shining like a diamond, rolling with the dice
Standing on the ledge, show the wind how to fly
When the world gets in my face
I say, have a nice day
Have a nice dayfree webcamsprodutos eroticos

JuliaFromTGR said...

Shining like a diamond, rolling with the dice
Standing on the ledge, show the wind how to fly
When the world gets in my face
I say, have a nice day
Have a nice dayfree webcamsprodutos eroticos

JuliaFromTGR said...

Ooh, if there's one thing I hang onto
That gets me through the night
I ain't gonna do what I don't want to
I'm gonna live my lifeLas Vegas Escortfree webcams

JuliaFromTGR said...

Say my name sun shines through the rain
A whole life so lonely
And then you come and ease the pain
I don't want to lose this feelingEscortVegas Escort

JuliaFromTGR said...

Ooh, if there's one thing I hang onto
That gets me through the night
I ain't gonna do what I don't want to
I'm gonna live my lifefree pornfree webcams

JuliaFromTGR said...

Ooh, if there's one thing I hang onto
That gets me through the night
I ain't gonna do what I don't want to
I'm gonna live my lifefree pornvibrador

JuliaFromTGR said...

Close your eyes, give me your hand, darling
Do you feel my heart beating
Do you understand
Do you feel the sameLondon Escortcam sex

JuliaFromTGR said...

Say my name sun shines through the rain
A whole life so lonely
And then you come and ease the pain
I don't want to lose this feelingUK Escortcam live

JuliaFromTGR said...

Close your eyes, give me your hand, darling
Do you feel my heart beating
Do you understand
Do you feel the sameLas Vegas Escortcam to cam

Julia From TGR said...

High Class London escortsRocks Off Naughty BoyDo you understand
Do you feel the same
Am I only dreaming

Julia From TGR said...

vibrators for womensexleksaker på nätetSoon as I get home, soon as I get home from work
Girl I’ll be around, never let you down
For all that it’s worth

Hiphop4Cash said...

How do i add previous and next post to my blog. i cannot do it :(Elektriske dildoerGold Coast Escorts

kosovohp03 said...

healthtips
healthtips
healthtips
healthtips
healthtips




socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
check socks proxy
socks proxy
socks proxy






funnystory
funnystory
funnystory
funnystory
funnystory




funny pictures
funny pictures
funny pictures
funny pictures
funny pictures
funny pictures






Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh





cute animal
food news
internet
football news
bank news
marketing
science news
travel vietnamt
real estate vietnam
business news
music news
health news
software
seo news

kosovohp03 said...

Girl Xinh | Hot Girl | Cute Girl | Sexy Girl |Hot Girl Asian | Hot Girl Xinh
Funny Story | Funny Stories | Funny | lol
Funny Pictures | funny | lol
Girl Xinh | Hot Girl | Cute GirlSexy Girl |Hot Girl Asian | Hot Girl Xinh | lexi belle | ngoc trinh

preetygirlsdelhi said...

Cheap and Best Independent Call Girl Raipur offers top class female, college girls, housewives, Russian and models at an affordable rate. Book high profile Raipur Escorts services at your place.


Raipur Escorts
Raipur Call Girls
Call Girls in Raipur
Raipur Escorts Whatsapp Number
Raipur Call Girls Photos
Indian Escorts service
Indian Call Girls
Russian Call Girls
Russian Escorts
Russian Escorts Service
Busty Call Girls
Busty Escorts Service
Busty Escorts
High Class Call Girls
High Class Escorts Service
High Class Escorts
Models Escorts
Models Escorts Service
Models Call Girls

----------------------------------------------

Ahmedabad Escorts service provider agency offers you, genuine call girls, at a cheap rate like Russian, Models, Indian, Ukraine and Chinees, etc. This is time to take advantage of these sexy babes. Call us at 24*7.


Ahmedabad Escorts
Ahmedabad Escort
Ahmedabad Escorts Service
Ahmedabad Escorts Agency
Independent Ahmedabad Escorts
Ahmedabad Call Girls
Cheap Escorts Ahmedabad
Call Girls in Ahmedabad
Ahmedabad Escorts Whatsapp Number

preetygirlsdelhi said...

I am Pooja Pathak Bangalore escorts and I offer high-class Independent escorts services in Bangalore in your budget with 100 % satisfaction guarantee.


Bangalore Escorts
Bangalore Escort
Bangalore Escorts Service
Bangalore Escorts Agency
Independent Bangalore Escorts
Bangalore Call Girls
Cheap Escorts Bangalore
Call Girls in Bangalore
Bangalore Escorts Whatsapp Number

----------------------------------------------

We are Providing Russians, young call girls Gurgaon Escorts, Hot & Sexy Escorts in Gurgaon. Contact Escorts Service in Gurgaon directly for an Escort.


Gurgaon Escorts
Gurgaon Escort
Russian Escorts Gurgaon
Gurgaon Escorts Service
Gurgaon Escorts Agency
Independent Gurgaon Escorts
Gurgaon Call Girls
Cheap Escorts Gurgaon
Call Girls in Gurgaon
Gurgoan Escorts Whatsapp Number

Your Secret Desires said...

I know it’s okay to have differing opinions, and I won’t unfollow someone because we disagree a few times. But I love blogs that mostly agree with my thoughts on books. That’s just because I don’t want to read about someone bashing a book that I adored, or praising a book that I despised. It puts me off! If it happens once in a blue moon, no biggie. But if we constantly have differing opinions, I just can’t click with the blog!
escorte gatineau
ottawa escort agency
ottawa escort agencies
Punggol Escorts
Sengkang Escorts
Serangoon Escorts

Mandira Chopra said...

If you are looking for sexy VIP call girls photos, Just visit our website. Delhi escorts girls available 24/7 for Incall & outcall services in 4 & 5-star hotel.

Saket Call girls Service
Saket Call girls
Saket Escorts
Independent Saket Escorts
Saket Escorts Photos


preetygirlsdelhi said...

Are you looking for Kolkata Call Girls, VIP Models, and real fun, then you are in the right place. Our Kolkata Call Girls with Photo and number here.

Alambazar Escorts Photos
Alambazar Escorts
Alambazar Call Girls

Printer Repair City said...

Amazing, learn how to resolve Canon Printer Error u052 and solve canon printer error 6a81 Also canon printer error 5200 and this is good Canon Printer Error Code 1007 find out canon printer error e04 as well as canon printer error code p22