PHP: ArrayIterator::next - Manual

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: Sat, 27 Jan 2007

view this page in

# ArrayIterator::next

(no version information, might be only in CVS)

ArrayIterator::next -- Move to next entry

## Description

void ArrayIterator::next ( void )

This function moves the iterator to the next entry.

Пример 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

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

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST