Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/csv.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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:
Date: 2 years 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';
?>