Applications that are written in php most of the times need to export data for some purposes. In this tutorial, we will learn "How to export that data in Excel CSV fomat?" CSV is known as the EXCEL spreadsheet that have the data in a grid format.
There are many libraries available for php like Spreadsheet_Excel_Writer that can help to save the data in different format. Sometimes these libraries difficult to install. In this we can learn to get the csv format by using a simple few lines code.It will export the simple grid format.
simple format is csv : comma separated values format which can be opened in applications like ms-excel . It can be written as :