The difference is the object in use. The one in your OP is a custom object, whilst patryk's is a built in (5.2+/pecl zip 1.1.0+) class.
You can loop it after this:
if ($zip->open('test.zip') === TRUE)
foreach ($dwnfiles as $filer)
$zip->addFile('../' . $filer, basename($filer));
header("Content-length: " . filesize('test.zip'));
header('Content-Disposition: attachment; filename="test.zip"');
Its a pity that the zip archive only works with a string, otherwise you can create a stream and not worry about having a zip file sticking around needing to be deleted.