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 understand
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 D
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) {
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 t
4 matches
Mail list logo