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 an array with the lengths of the values of each field from the current rowphp dbx 函数 send a query and fetch all results if any php enchant 函数 returns a list of available dictionariesphp enchant 函数 will return a list of values if any of those pre conditions are not metphp gupnp 函数 sets the specified action return valuesphp runkit 函数 determines if the current functions return value will be usedphp snmp 函数 return the method how the snmp values will be returnedphp snmp 函数 specify the method how the snmp values will be returnedphp ssh2 函数 return list of negotiated methodsphp statistic 函数 calculates any one parameter of the beta distribution given values for the othersphp statistic 函数 calculates any one parameter of the negative binomial distribution given values for the othersphp statistic 函数 calculates any one parameter of the non central chi square distribution given values for the othersphp statistic 函数 calculates any one parameter of the non central f distribution given values for the othersphp statistic 函数 calculates any one parameter of the non central t distribution give values for the othersphp statistic 函数 calculates any one parameter of the normal distribution given values for the othersphp statistic 函数 calculates any one parameter of the poisson distribution given values for the othersphp statistic 函数 calculates any one parameter of the t distribution given values for the othersphp svn 函数 return true if the path points to a file false otherwisephp svn 函数 return true if props are different 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 graph
关注编程学问公众号