[nycphp-talk] Simple XML discussion at Zend
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Tue Jan 20 11:02:16 EST 2004
On Tue, 20 Jan 2004, Chris Shiflett wrote:
> --- Adam Maccabee Trachtenberg <adam at trachtenberg.com> wrote:
> > 5) SimpleXML now returns iterators instead of arrays, so you should
> > now be able to cycle through results using foreach regardless of
> > the number of elements returned. (i.e. even one element works.)
>
> Hey, why don't you give us a nice explanation of what iterators are. :-)
Maybe next week. :)
For now, iterators are ways to loop through results that aren't arrays
(retrieved rows from a database, files in a directory, nodes in an XML
document), in a foreach as if the results were placed in an array.
-adam
--
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!
More information about the talk
mailing list