Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How do I access an xml string value with SimpleXML?

     
10:15 am on Apr 30, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 30, 2003
posts:57
votes: 0


Hello everyone

I'm a bit stumped with this problem. The solution is probably fairly simple, but I've spent hours trying to figure this out.

$tweeters = new SimpleXMLElement($twi);

I do a var_dump($tweeters) and I get this..

object(SimpleXMLElement)#1 (4) { ["reset-time-in-seconds"]=> string(10) "1241085902" ["remaining-hits"]=> string(2) "40" ["hourly-limit"]=> string(3) "100" ["reset-time"]=> string(25) "2009-04-30T10:05:02+00:00" }

Now how the heck do I access the "remaining-hits" string in this array?

Thanks very much,

Dave

11:02 am on Apr 30, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 30, 2003
posts:57
votes: 0


Thanks guys - figured it out.

Dave

12:13 pm on Apr 30, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


Glad you got it sorted. Care to share the expression that shows how to access that string? It may help a future reader ;)