Vous êtes ici Fonction PHP > Description de la fonction ArrayIterator::rewind()

 

Recherche sur les Noms des fonctions php/mysql

 
 

ArrayIterator::rewind()

Définition

-

Description

void ArrayIterator::rewind ( void )

Revient à la position initiale.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Aucune valeur n'est retournée.

Exemples

Exemple #1 Exemple avec ArrayIterator::rewind()

<?php
$arrayobject 
= new ArrayObject();

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

$iterator $arrayobject->getIterator();

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

$iterator->rewind(); // revient au début
echo $iterator->key(); //0
?>



 
 

Bout de code utilisant la fonction ArrayIterator::rewind()


Aucun bout de code n'utilise la fonction ArrayIterator::rewind(). N'hésitez pas à en proposer un en vous connectant à l'espace membre.