src/Fts.php
public function words($table, $search, $docid)
    {
        $words = array();
        $search = $this->search($table, $search, 1, 's.docid = '.$docid);
        if (empty($search)) {
            return $words;
        }
        $row = array_shift($search);
        $fields = $this->db->row("SELECT * FROM {$table} WHERE docid = ? LIMIT 1", $row['docid'], 'assoc');

        return $this->offset(array_merge($fields, $row), array_keys($fields));
    }
public function words($table, $search, $docid)
    {
        $words = array();
        $search = $this->search($table, $search, 1, 's.docid = '.$docid);
        if (empty($search)) {
            return $words;
        }
        $row = array_shift($search);
        $fields = $this->db->row("SELECT * FROM {$table} WHERE docid = ? LIMIT 1", $row['docid'], 'assoc');

        return $this->offset(array_merge($fields, $row), array_keys($fields));
    }
Get the words that made your **$search** relevant for **$docid**.

@param string $table  The database table name.
@param string $search The search term(s) to '**MATCH**'.
@param mixed  $docid  The **$table** row's docid.

@return array The unique words found which made the **$search** relevant.

@example

```php
echo implode(', ', $db->fts->words('results', 'fish', 101)); // fishes, fish
```