$foo_db = dbase_open ( 'foo.dbf', 0);
if ($foo_db) {
$rn = dbase_numrecords($foo_db);
echo "Record 0: ";
$test = dbase_get_record_with_names($foo_db, 0);
echo $test['deleted'] . " FOO BAR: '" . $test['BAR'] . "'\n";
echo "Record n+1: ";
$test = dbase_get_record_with_names($foo_db, $rn+1);
echo $test['deleted'] . " FOO BAR: '" . $test['BAR'] . "'\n";
}
Gives:
Record 0: 0 FOO BAR: ' '
Record n+1:
Warning: Tried to read bad record 30 in ./DisplayAccounts.php on line 21
FOO BAR: ''
0 is not an error record, it's just empty - and actually, not quite empty, as you see BAR got a single space.