PHP Classes

File: examples/csv.php

Recommend this page to a friend!
  Classes of Mark Rolich   Extended Generic Pager   examples/csv.php   Download  
File: examples/csv.php
Role: Example script
Content type: text/plain
Description: Example of CSV pagination
Class: Extended Generic Pager
Paginate data listings from arrays, CSV or MySQL
Author: By
Last change: Update of examples/csv.php
Date: 6 months ago
Size: 332 bytes
 

Contents

Class file image Download
<?php
include '../Pager.php';
include
'../PagerCSV.php';

$pageNum = (isset($_GET['p']) && $_GET['p'] != '') ? (int)$_GET['p'] : 1;

$handle = fopen('data.csv', "r");

$pager = new PagerCSV($pageNum);
$data = $pager->getData($handle);

$pagerNav = $pager->render();

$pageTitle = 'Pager - CSV example';
include
'example.tpl.php';
?>