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

search for in the

ArrayIterator::seek> <ArrayIterator::next
Last updated: Fri, 22 Aug 2008

view this page in

ArrayIterator::rewind

(PHP 5)

ArrayIterator::rewindRecoloca o array no início

Descrição

void ArrayIterator::rewind ( void )

Esta função recoloca o iterador no início do array.

Parâmetros

Esta função não contém parâmetros.

Valor Retornado

Não há valor retornado.

Exemplos

Exemplo #1 Exemplo de ArrayIterator::rewind()

<?php
$arrayobject 
= new ArrayObject();

$arrayobject[] = 'zero';
$arrayobject[] = 'um';
$arrayobject[] = 'dois';

$iterator $arrayobject->getIterator();

$iterator->next();
echo 
$iterator->key(); //1

$iterator->rewind(); //retornando ao início
echo $iterator->key(); //0
?>



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

ArrayIterator::seek> <ArrayIterator::next
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites