WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform
Check the word is correctly spelled and provide suggestions

enchant_dict_quick_check

(PECL enchant:0.2.0-1.0.1)

enchant_dict_quick_check — Check the word is correctly spelled and provide suggestions

Description

bool enchant_dict_quick_check ( resource $dict , string $word [, array &$suggestions ] )

If the word is correctly spelled return TRUE, otherwise return FALSE, if suggestions variable is provided, fill it with spelling alternatives.

Parameters

dict

Dictionary resource

word

The word to check

suggestions

If the word is not correctly spelled, this variable will contain an array of suggestions.

Return Values

Returns TRUE if the word is correctly spelled or FALSE

Examples

Example #1 A enchant_dict_quick_check() example

<?php
$tag 
'en_US';
$r enchant_broker_init();

if (
enchant_broker_dict_exists($r,$tag)) {
    
$d enchant_broker_request_dict($r$tag);
    
enchant_dict_quick_check($d'soong'$suggs);
    
print_r($suggs);
}
?>

The above example will output something similar to:

 
 Array (     [0] => song     [1] => snog     [2] => soon     [3] => Sang     [4] => Sung     [5] => sang     [6] => sung     [7] => sponge     [8] => spongy     [9] => snag     [10] => snug     [11] => sonic     [12] => sing     [13] => songs     [14] => Son     [15] => Sonja     [16] => Synge     [17] => son     [18] => Sejong     [19] => sarong     [20] => sooner     [21] => Sony     [22] => sown     [23] => scone     [24] => song's )