Files and Directories

Split and Export into Multiple Excel Sheet Files using PHP

August 17, 2018
When we are dealing with huge volume of records export into excel or CSV, we cannot blindly export them into a file. Imagine we have a million records, what would happen if we export those records into a single excel file! In this kind of situation, we should group the records and split them into […]
This tutorial was added to PHP.

Array to XML Conversion using PHP

January 30, 2018
When there is a necessity to serialize a PHP array, it can be converted to XML, store and also may be transmitted. In that process, the key/element pairs are converted into structural nodes. The XML nodes are created in the name of the keys and the array element is added as the child to this […]
This tutorial was added to PHP.

Insert XML Data to MySql Table

January 19, 2018
Programmatically importing XML data into a MySQL database will be handy in many a situations. In this tutorial, we are going to learn how to insert data from XML file to the database using PHP.┬áThe XML nodes are considered as the columns of the database table and so the data of each node are the […]
This tutorial was added to PHP.

Generate PDF from MySQL Data using FPDF

June 8, 2015
In this tutorial, we are going to see how to generate PDF from MySQL table by using FPDF library. In a previous tutorial, we have seen about simple PDF generation from a text file content by using this library. In this example, we read MySQL table data by using PHP. And then we are calling […]
This tutorial was added to PHP.

PHP PDF Generation using FPDF

May 25, 2015
In this tutorial, we are going to generate PDF from text file data using PHP FPDF library. In this library, there are features to add PDF page, set font, create grid and more. In this example, we are having a text file containing toys detail. We are reading this file content and show it in […]
This tutorial was added to PHP.

PHP CSV File Export Using fputcsv()

October 24, 2014
In this tutorial, we are going to export MySQL records to a CSV File using PHP function fputcsv(). In the previous article, we have formatted the array of database results as CSV string. But by using fputcsv() function we need not format data to export it to a .csv file. View Demo PHP fputcsv() In […]
This tutorial was added to PHP.

PHP CSV File Export

October 23, 2014
In this tutorial, we are going to see how to export MySQL database records to a CSV file. Few days before we have seen about how to read from a CSV file. After connecting to the database, we have to fetch MySQL table records. These database results should be formatted as CSV string with proper […]
This tutorial was added to PHP.

PHP CSV File Read

April 4, 2014
This tutorial is to help you to read a CSV file or data. Character Separated Values(CSV) or Comma Separated Values is a file type containing plain text content with a comma or a character as separators. It is a convenient form to store simple data. PHP has two inbuilt functions to read CSV file. fgetcsv() […]
This tutorial was added to PHP.

PHP file_get_contents()

September 22, 2013
In PHP, file_get_contents() function is one of the file handling functions available in this scripting language. This function reads entire file source or part of it and returns as a PHP string data. This is most widely used function among other dedicated functions used for PHP file read. For example, file(), fread() and etc. PHP […]
This tutorial was added to PHP.

PHP Directory Functions

July 15, 2013
Some days before we have seen set of basic PHP file functions to perform file open, read, write or append operations. Similarly, PHP includes set of directory functions to deal with the operations, like, listing directory contents, and create/ open/ delete specified directory and etc. These basic functions are listed below. mkdir(): To make new […]
This tutorial was added to PHP.

↑ Back to Top