pspell_suggest

array pspell_suggest(int dictID, string word) 
dictID Dictionary link ID
word Word upon which to base suggestions

Suggests alternate spelling(s) for a misspelled word.

Returns:

Array of suggested spellings; FALSE if an error occurs

Description:

This function accepts a (presumably misspelled) word and returns a list of suggested correct spellings. The list is taken from the default list in the dictionary being used, any additional replacement pairs provided via pspell_store_replacement(), and any personal replacement wordlists contained in personal wordlists if such are being used.

Example:

Command-line script for checking and suggesting on a single word
 #!/usr/local/bin/php -q <?php error_reporting(E_ALL); if ($argc != 2) ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.