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

search for in the

ArrayIterator::rewind> <ArrayIterator::key
Last updated: Sun, 25 Nov 2007

view this page in

ArrayIterator::next

(PHP 5)

ArrayIterator::next — Move to next entry

Description

void ArrayIterator::next ( void )

This function moves 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();
}
?>

Výstup horeuvedeného príkladu bude:

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: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites