1As found as a comment on http://www.php.net/ziparchive:
2
3The following code can be used to get a list of all the file names in a zip file.
4
5<?php
6$za = new ZipArchive();
7
8$za->open('theZip.zip');
9
10for( $i = 0; $i < $za->numFiles; $i++ ){
11 $stat = $za->statIndex( $i );
12 print_r( basename( $stat['name'] ) . PHP_EOL );
13}
14?>