How to create a zip file using PHP

Recently I had to write a script to create a zip file containing different files and folders. PHP has a ZipArchive class which can be used easily to create zip files. In this article we will see how to create zip files in PHP. We will create different zip files from different files and folders. …

How to create a zip file using PHP Read More »

How to create CSV file using PHP

CSV (comma-separated values) is one of the most popular methods for transferring tabular data between applications. Lot of applications want to export data in a CSV file. In this article we will see how we can create CSV file using PHP. We will also see how to automatically download the file instead of just showing …

How to create CSV file using PHP Read More »

How to sort a multi-dimension array by value in PHP

In this article we will see how to sort a multi-dimension array by value of one of the keys of the array. We can use a few different methods to do this. One way to to use usort() function. Another way is to just identify the values and create another array with the values and …

How to sort a multi-dimension array by value in PHP Read More »

How to add favicon in WordPress using Jetpack

NOTE: From WordPress 4.3 onwards, it is recommended that you use the Site Icon feature that is built into WordPress, instead of following the guidance below. The Site Icon feature can be found by going to Appearance -> Customize and clicking on Site Identity. In my earlier post Understanding favicon I explained what is a …

How to add favicon in WordPress using Jetpack Read More »

How to enable HTTPS on WordPress using CloudFlare

Recently, Google said it will use HTTPS as a ranking signal. So, if you are a website owner, you might be thinking of switching to HTTPS. However, that meant purchasing an SSL certificate. Last month CloudFlare announced Universal SSL which will allow all its customers (including free users) to be able to use SSL on …

How to enable HTTPS on WordPress using CloudFlare Read More »