src/ShapeFile.php
public function getIndexFromDBFData($field, $value)
    {
        foreach ($this->records as $index => $record) {
            if (isset($record->DBFData[$field]) &&
                (trim(strtoupper($record->DBFData[$field])) == strtoupper($value))
            ) {
                return $index;
            }
        }

        return -1;
    }
public function getIndexFromDBFData($field, $value)
    {
        foreach ($this->records as $index => $record) {
            if (isset($record->DBFData[$field]) &&
                (trim(strtoupper($record->DBFData[$field])) == strtoupper($value))
            ) {
                return $index;
            }
        }

        return -1;
    }
public function getIndexFromDBFData ( $ field , $ value ) { foreach ( $ this -> records as $ index => $ record ) { if ( isset ( $ record -> DBFData [ $ field ] ) && ( trim ( strtoupper ( $ record -> DBFData [ $ field ] ) ) == strtoupper ( $ value ) ) ) { return $ index ; } } return - 1 ; }
Lookups value in the DBF file and returs index.

@param string $field Field to match
@param mixed  $value Value to match

@return int
Lookups value in the DBF file and returs index .