PHP Doku:: Rewind the DirectoryIterator back to the start - directoryiterator.rewind.html

Verlauf / Chronik / History: (6) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStandard PHP Library (SPL)IteratorenThe DirectoryIterator classDirectoryIterator::rewind

Ein Service von Reinhard Neidl - Webprogrammierung.

The DirectoryIterator class

<<DirectoryIterator::next

DirectoryIterator::seek>>

DirectoryIterator::rewind

(PHP 5)

DirectoryIterator::rewindRewind the DirectoryIterator back to the start

Beschreibung

public void DirectoryIterator::rewind ( void )

Rewind the DirectoryIterator back to the start.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

Beispiel #1 DirectoryIterator::rewind() example

<?php
$iterator 
= new DirectoryIterator(dirname(__FILE__));

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

$iterator->rewind(); //rewinding to the beginning
echo $iterator->key(); //0
?>

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)