ArrayIterator::next

(PHP 5, PHP 7)

ArrayIterator::nextMove to next entry

说锟斤拷

public ArrayIterator::next ( void ) : void

The iterator to the next entry.

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

没锟叫凤拷锟斤拷值锟斤拷

锟斤拷锟斤拷

Example #1 ArrayIterator::next() example

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