|
DirectoryIterator::keyReturn the key for the current DirectoryIterator item Description
public mixed DirectoryIterator::key()
Get the key for the current DirectoryIterator item. ParametersThis function has no parameters. Return ValuesThe key for the current DirectoryIterator item as an int. Changelog
Examples
Example #1 A DirectoryIterator::key example
The above example will output something similar to: 0 => apple.jpg 1 => banana.jpg 2 => index.php 3 => pear.jpg See Also
|