PHP.nl

pspell_suggest

pspell_suggest

Suggest spellings of a word

 **pspell_suggest** PSpell\Dictionary $dictionary string $word
returns an array of possible

spellings for the given word. pspell_suggest

dictionary``wordThe tested word.

Returns an array of possible spellings.

Voorbeeld: example

<?php
$pspell = pspell_new("en");

if (!pspell_check($pspell, "testt")) {
    $suggestions = pspell_suggest($pspell, "testt");

    foreach ($suggestions as $suggestion) {
        echo "Possible spelling: $suggestion<br />";
    }
}
?>