Tech Tutorials Database
GeekArticles Web Programming PHP

PHP Iterator

Category: PHP
Comments (0)

Dejan Bosanac PHP arrays are generally a very powerful object container. But still, we can easily add a little more fuel to them. Imagine an iterator object as a kind of wrapper around our arrays. What we will try to accomplish here is to create unique interface for traversing arrays and to add a little more control over how our objects are created and finally, to support lazy loading. Interface Iterator has a very simple and many times seen interface. <?php function Iterator ( $array )...n


Sponsored Links

Read Next: PHP-HTML Templates: A New Working Relationship