PHP Manual
Prev |  | Next

# dbase_numfields

dbase_numfields -- find out how many fields are in a dBase database

## Description

`int dbase_numfields`(int dbase_identifier);

Returns the number of fields (columns) in the specified database. Field numbers are between 0 and dbase_numfields($db)-1, while record numbers are between 1 and dbase_numrecords($db).

Example 1. Using dbase_numfields()
    $rec = dbase_get_record($db, $recno);
    $nf  = dbase_numfields($db);
    for ($i=0; $i < $nf; $i++) {
        print $rec[$i]."<br>\n";
    }

Prev | Home | Next
dbase_get_record_with_names | Up | dbase_numrecords