public static function create($save_path, $files) { // Since files can be an array or a path... if (!is_array($files)) { $files = array($files); } $archive = new Archive(); // Loop through files...(or the one directory/file) foreach ($files as $file) { if (file_exists($file)) { $archive->add($file); } } // Save the file $archive->save($save_path); // Status return file_exists($save_path); }