News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Hakre's Blog:
Iterating over Multiple Iterators at Once
April 16, 2012 @ 12:09:44

In a recent post to his blog Hakre looks at iterating over iterators (multiples all at once) using either the Append Iterator or the MultipleIterator.

PHP's SPL has two build-in Iterators that deal with multiple iterators at once: AppendIterator and MultipleIterator. In this posting I'll cover both a bit.

He gives some sample code for each - showing how to use the AppendIterator to combine multiple iterators into one set and using the MultipleIterator to attach (not append/merge into one set) multiple iterator objects to a single, iteratable object. He als mentions a "lost" iterator, the DualIterator that never made it out of a SVN repository and into the main codebase.

0 comments voice your opinion now!
iterating multiple simultaneous appenditerator multipleiterator tutorial


blog comments powered by Disqus

Similar Posts

Jason Gilmore's Blog: How I Learned to Stop Worrying and Love Zend_Form

NetTuts.com: Setting Up User Authentication in Laravel Using Confide

HowTo Forge: Fedora 8 Server Setup - LAMP, Email, DNS, FTP, ISPConfig - Page 6

WaxJelly Blog: Simple PHP script using the YouTube API (with pagination)

PHP-GTK Community Site: Code completion for PHP-GTK in Zend Studio 5.5


Community Events





Don't see your event here?
Let us know!


interview release language configure developer introduction framework laravel community library list wordpress series unittest api threedevsandamaybe application podcast install code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework