<?php $array = array('1' => 'un', '2' => 'deux', '3' => 'trois');
$arrayobject = new ArrayObject($array);
$iterator = $arrayobject->getIterator();
while($iterator->valid()) { echo $iterator->key() . ' => ' . $iterator->current() . "\n";
$iterator->next(); } ?>
|