I’m trying to get a list of the files contained in a zip archive, and it is not immediately apparent how to do this. I can see the values of the [name] element with:
$zip = new ZipArchive();
$file = ‘/some/file.zip’;
$numfiles = $zip->numFiles;
…but I’m not interested in dumping the raw array out; only accessing the [name] element. I had thought that this would be done with [php]$foo = $zip->statIndex($i)[name];[/php] or [php]$foo = $zip->statIndex($i)[‘name’];[/php] but PHP just complains about an unexpected ‘[’.
Can anyone nudge me in the right direction?