Re: Object Array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
On Thu, May 18, 2006 1:25 pm, Jay Paulson wrote:

I tried with no success yesterday to get an answer to this question so
I'll
try again.

I have an object from using simpleXML and inside that object is an
array
holding even more objects.  However, it's not acting like an array and
therefore I can't go through it. (i.e. I can't use the count function
to see
how big it is and loop through it)

This below should be an array:

$xml->RES->R


Just for fun, try using $xml['RES'] to get $res, and $res['R'] to get
$r and see what $r is.

I don't see *HOW* they could manage to override the -> operator
(unlike C++) but maybe they hacked it somehow...

Guess simpleXML isn't looking quite so simple anymore, eh? :-^

its (simpleXML) a blooming oxymoron!

but do note that implmenting the Iterator interface in a userland class
doesn't have the same [nightmarish] affect in print_r()/var_dump(), in such
cases you just get a 'normal' dump of the object in question. simpleXMLElements
(or whatever they are called) are from my experience rather 'unique' with respect
to trying to dump them in order to figure out how they are built up - i.e. you can't



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux