News Feed
Sections




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

PHPro.org:
SPL AppendIterator
December 17, 2008 @ 11:19:32

On the PHPro.org website Kevin Waterson has posted a look at the AppendIterator iterator, a part of the SPL (Standard PHP Library) that is included with PHP5.

The SPL AppendIterator provides a method of iterating over multiple arrays at the same time. This can be very useful when aggregating data from different sources, such as XML or RSS feeds or even multiple database sources. The flexibility and efficiency of the whole SPL suite of tools is a the disposal of the AppendIterator making manipulating data in multiple objects fast and simple with a minimum of code.

His example shows what an AppendIterator object looks like, how to use it to add new values to an array and how to filter values out of the append process with a FilterIterator object.

0 comments voice your opinion now!
tutorial spl appenditerator filteriterator filter array


blog comments powered by Disqus

Similar Posts

Lorna Mitchell's Blog: Using OAuth2 for Google APIs with PHP

SitePoint PHP Blog: Build a New App with Laravel and EmberJS in Vagrant

php|architect: Using the PEAR Installer (Parts 1 & 2)

Zend Developer Zone: Zend_Controller_Action, Now With Parameters!

Mike Purcell's Blog: PHP - Reflection Class - Determine Parent Method Signature


Community Events

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


unittest release opinion community development extension voicesoftheelephpant threedevsandamaybe library interview introduction wordpress framework middleware language series podcast laravel api laravel5

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