memclutter/php-dbf

Some php classes for easy work with dBase databases.

1.0.0 2015-12-13 15:42 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:04:39 UTC


README

Some php classes for easy work with dBase databases

usage

First, require dBase class

require 'dBase.php';

Next, create or open dbf file.

$filename = 'example.dbf';
$mode = dBase::MODE_READ_WRITE;

$dBase = dBase::open($filename, $mode);
//$dBase = dBase::create($filename, $mode);

For read rows use Iterator interface

foreach ($dBase as $record) {
    print_r($record);
}

For write record use array index operation

// append new record
$dBase[] = [
    // column values
];

// modify exists record by index
$dBase[32] = [
    // new column values
];

For delete use unset operation

// delete record by index
unset($dBase[0]);

Good luck!