src/Fts.php
public function offset(array $row, array $fields)
    {
        $words = array();
        $search = array();
        foreach ($fields as $value) {
            $search[] = (isset($row[$value])) ? $row[$value] : '';
        }
        $offsets = explode(' ', $row['offsets']);
        $combine = array();
        for ($i = 0; $i < (count($offsets) / 4); ++$i) {
            list($column, $term, $byte, $size) = array_slice($offsets, $i * 4, 4);
            $word = strtolower(substr($search[$column], $byte, $size));
            if ($combine == array($column, $term, $byte)) {
                $word = array_pop($words).' '.$word;
            }
            $words[] = $word;
            $combine = array($column, $term + 1, $byte + $size + 1); // same column, next term, one space away
        }
        $words = array_unique($words);
        rsort($words);

        return $words;
    }
public function offset(array $row, array $fields)
    {
        $words = array();
        $search = array();
        foreach ($fields as $value) {
            $search[] = (isset($row[$value])) ? $row[$value] : '';
        }
        $offsets = explode(' ', $row['offsets']);
        $combine = array();
        for ($i = 0; $i < (count($offsets) / 4); ++$i) {
            list($column, $term, $byte, $size) = array_slice($offsets, $i * 4, 4);
            $word = strtolower(substr($search[$column], $byte, $size));
            if ($combine == array($column, $term, $byte)) {
                $word = array_pop($words).' '.$word;
            }
            $words[] = $word;
            $combine = array($column, $term + 1, $byte + $size + 1); // same column, next term, one space away
        }
        $words = array_unique($words);
        rsort($words);

        return $words;
    }
Sorts through the **$row['offsets']** integers, and retrieves the words they reference.

@param array $row    An associative array of each **$fields** value, including an '**offsets**' key.
@param array $fields An array of field names in the same order as they are found in the database search table.

@return array The words that made this row relevant.

@example

```php
print_r($db->fts->offset(array(
'search' => "If wishes were fishes, we'd have a fish fry.",
'offsets' => '0 0 15 6 0 0 35 4',
), array('search'))); // array('fishes', 'fish');
```

@link https://www.sqlite.org/fts3.html#offsets