Welcome to WebmasterWorld Guest from 54.205.251.179

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)

10+ Year Member



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)

10+ Year Member



Thanks guys - figured it out.

Dave

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

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



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