mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
added examples to trunk. git-svn-id: http://parsecsv-for-php.googlecode.com/svn/trunk@13 339761fc-0c37-0410-822d-8b8cac1f6a97
21 lines
325 B
PHP
21 lines
325 B
PHP
<pre>
|
|
<?php
|
|
|
|
require_once('../parsecsv.lib.php');
|
|
|
|
$csv = new parseCSV();
|
|
|
|
# if sorting is enabled, the whole CSV file
|
|
# will be processed and sorted and then rows
|
|
# are extracted based on offset and limit
|
|
$csv->sort_by = 'title';
|
|
|
|
$csv->limit = 3;
|
|
$csv->offset = 2;
|
|
|
|
$csv->auto('books.csv');
|
|
|
|
print_r($csv->data);
|
|
|
|
?>
|
|
</pre>
|