PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Aneesh R   CSV Parse and Read   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This will show how to use the class file
Class: CSV Parse and Read
Parse and display data from a CSV file
Author: By
Last change:
Date: 16 years ago
Size: 501 bytes
 

Contents

Class file image Download
<?php
/**
 * This Script Demonstrates how we can use the CSV_Reader class
 */
 
require_once ('csv_reader.php');
 
$read = new CSV_Reader;

$read->strFilePath = 'read_it.csv';
$read->strOutPutMode = 0; // 1 will show as HTML 0 will return an array
/**
 * You must run this script to Set the essesntial Configuration
 */
$read->setDefaultConfiguration();
$read->readTheCsv();
$read->printOutPut(); // You can run this script or directly acces $read->arrOutPut to get the outpuy