AppendIterator::append

(PHP 5 >= 5.1.0, PHP 7)

AppendIterator::appendAppends an iterator

설명

public void AppendIterator::append ( Iterator $iterator )

Appends an iterator.

인수

iterator

The iterator to append.

반환값

값을 반환하지 않습니다.

예제

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;
}
?>

위 예제의 출력:

abcdef

참고

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top