PHP code example of memclutter / php-dbf

1. Go to this page and download the library: Download memclutter/php-dbf library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

memclutter / php-dbf example snippets




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

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

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

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

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

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