Re: When is an array not an array?
- From: "whiskey" <alex.habar.nam@xxxxxxxxx>
- Date: 30 Oct 2006 07:01:49 -0800
Does anyone have an explanation as to why a DOMNodeList can be accessed like
an array using 'foreach', but won't allow square-brackets to be used? What
exactly *is* a DOMNodeList?
A DOMNodeList is an object - this is why you can't access items using
square-brackets.
Since PHP5 you can iterate through all visible properties of an object
- this is why you can access items using a foreach statement.
.
- References:
- When is an array not an array?
- From: Andrew C
- Re: When is an array not an array?
- From: Andy Hassall
- When is an array not an array?
- Prev by Date: Re: Create thumbnails with clickable links XYZ
- Next by Date: Re: getElementById in PHP5
- Previous by thread: Re: When is an array not an array?
- Next by thread: Re: When is an array not an array?
- Index(es):