ZIPARCHIVE.GETNAMEINDEX(3) 1 ZIPARCHIVE.GETNAMEINDEX(3)
ZipArchive::getNameIndex - Returns the name of an entry using its index
SYNOPSIS
string ZipArchive::getNameIndex (int $index, [int $flags])
DESCRIPTION
Returns the name of an entry using its index.
PARAMETERS
o $index
- Index of the entry.
o $flags
- If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged name is returned.
RETURN VALUES
Returns the name on success or FALSE on failure.
EXAMPLES
Example #1
ZipArchive.getNameIndex(3) example
<?php
if ($zip->open('test.zip') == TRUE) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$filename = $zip->getNameIndex($i);
// ...
}
}
?>
PHP Documentation Group ZIPARCHIVE.GETNAMEINDEX(3)