enchant_dict_suggest

(PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )

enchant_dict_suggestWill return a list of values if any of those pre-conditions are not met

说明

enchant_dict_suggest ( resource $dict , string $word ) : array

参数

dict

Dictionary resource

word

Word to use for the suggestions.

返回值

Will returns an array of suggestions if the word is bad spelled.

范例

Example #1 A enchant_dict_suggest() example

<?php
$tag 
'en_US';
$r enchant_broker_init();
if (
enchant_broker_dict_exists($r,$tag)) {
    
$d enchant_broker_request_dict($r$tag);

    
$wordcorrect enchant_dict_check($d"soong");
    if (!
$wordcorrect) {
        
$suggs enchant_dict_suggest($d"soong");
        echo 
"Suggestions for 'soong':";
        
print_r($suggs);
    }
    
enchant_broker_free_dict($d);
}
enchant_broker_free($r);
?>

参见

相关文章
php cubrid mysql 兼容性函数 return a numerical array with the values of the current rowphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp enchant 函数 check whether a word is correctly spelled or notphp enchant 函数 will return a list of values if any of those pre conditions are not metphp inotify 函数 return a number upper than zero if there are pending eventsphp mcve 函数 whether or not to validate the passed identifier on any transaction it is passed tophp ncurses 函数 do not translate newline and carriage return / line feedphp runkit 函数 determines if the current functions return value will be usedphp snmp 函数 return the method how the snmp values will be returnedphp sqlite 函数 opens an sqlite database and create the database if it does not existphp statistic 函数 calculates any one parameter of the binomial distribution given values for the othersphp statistic 函数 calculates any one parameter of the cauchy distribution given values for the othersphp statistic 函数 calculates any one parameter of the chi square distribution given values for the othersphp statistic 函数 calculates any one parameter of the exponential distribution given values for the othersphp statistic 函数 calculates any one parameter of the f distribution given values for the othersphp statistic 函数 calculates any one parameter of the weibull distribution given values for the othersphp svn 函数 return true if content is different false otherwisephp svn 函数 deletes a file or a directory return true if all is ok false otherwisephp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graphphp swoole lock try to acquire the lock. it will block if the lock is not available.
关注编程学问公众号