Re: [PHP] is_array() doesn't work on DOM properties?

2005-07-26 Thread John Smith
This is with simplexml_load_file(). Using an empty() check instead of is_array() does the trick (though - note to php hackers - I think is_array() SHOULD work). John --- Jochem Maas [EMAIL PROTECTED] wrote: John Smith wrote: I'm trying to avoid error messages while iterating over DOM

Re: [PHP] is_array() doesn't work on DOM properties?

2005-07-26 Thread Jochem Maas
John Smith wrote: This is with simplexml_load_file(). Using an empty() check instead of is_array() does the trick (though - note to php hackers - I think is_array() SHOULD work). ah simplexml, in that case is_array() shouldn't and won't work because it's 'all' objects (although I can

Re: [PHP] is_array() doesn't work on DOM properties?

2005-07-25 Thread Jochem Maas
John Smith wrote: I'm trying to avoid error messages while iterating over DOM properties. e.g. if(is_array($dom-stuff-props)) { maybe you can get roudn the problem by saying?: if($dom-stuff-props) { or?: if(!empty($dom-stuff-props)) { foreach($dom-stuff-props as $prop) { ...

[PHP] is_array() doesn't work on DOM properties?

2005-07-24 Thread John Smith
I'm trying to avoid error messages while iterating over DOM properties. e.g. if(is_array($dom-stuff-props)) { foreach($dom-stuff-props as $prop) { ... } } It works without the is_array() check, but not with it. I've done var_dumps and $dom-stuff-props is indeed an array. I've also tried