PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

AppendIterator::append

(PHP 5 >= 5.1.0)

AppendIterator::appendAppends an iterator

Description

public void AppendIterator::append ( Iterator $iterator )

Appends an iterator.

Parameters

iterator

The iterator to append.

Return Values

No value is returned.

Examples

Example #1 AppendIterator::append example

<?php
$array_a 
= new ArrayIterator(array('a''b''c'));
$array_b = new ArrayIterator(array('d''e''f'));

$iterator = new AppendIterator;
$iterator->append($array_a);
$iterator->append($array_b);

foreach (
$iterator as $current) {
    echo 
$current;
}
?>

The above example will output:

abcdef

See Also

PHP Manual