In this post we are talking about to creating zip file in PHP. It’s very simple to create zip file, similar to creating in desktop. There is one more logic behind to creating zip file, if you want give some stuff for download to your users, then you have to upload completely zip file in your server then provide the download link over it.
But with the use of this function you just have to give the files that you want to store in zip and the name of the zip file that you want to create, yes you will create a single zip file with the collection of files. As you see in the below codes i have created a simple form and with the use of check-box i have given the choice for the files that you want to add in the zip file, and then all the rest work depending on the PHP.