PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ArrayIterator::rewind> <ArrayIterator::key
Last updated: Fri, 03 Oct 2008

view this page in

ArrayIterator::next

(PHP 5)

ArrayIterator::next次のエントリに移動する

説明

void ArrayIterator::next ( void )

この関数は次のエントリにイテレータを移動します。

パラメータ

この関数にはパラメータはありません。

返り値

値を返しません。

例1 ArrayIterator::next() の例

<?php
$arrayobject 
= new ArrayObject();

$arrayobject[] = 'zero';
$arrayobject[] = 'one';

$iterator $arrayobject->getIterator();

while(
$iterator->valid()) {
    echo 
$iterator->key() . ' => ' $iterator->current() . "\n";

    
$iterator->next();
}
?>

上の例の出力は以下となります。

0 => zero
1 => one



add a note add a note User Contributed Notes
ArrayIterator::next
There are no user contributed notes for this page.

ArrayIterator::rewind> <ArrayIterator::key
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites