array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'arrayiterator.rewind.php', 1 => 'ArrayIterator::rewind', ), 'up' => array ( 0 => 'class.arrayiterator.php', 1 => 'ArrayIterator', ), 'prev' => array ( 0 => 'arrayiterator.offsetunset.php', 1 => 'ArrayIterator::offsetUnset', ), 'next' => array ( 0 => 'arrayiterator.seek.php', 1 => 'ArrayIterator::seek', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/arrayiterator/rewind.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
ArrayIterator::rewind — Rewind array back to the start
Bu işlevin bağımsız değişkeni yoktur.
Hiçbir değer dönmez.
Örnek 1 ArrayIterator::rewind() example
<?php
$arrayobject = new ArrayObject();
$arrayobject[] = 'zero';
$arrayobject[] = 'one';
$arrayobject[] = 'two';
$iterator = $arrayobject->getIterator();
$iterator->next();
echo $iterator->key(); //1
$iterator->rewind(); //rewinding to the beginning
echo $iterator->key(); //0
?>