PHP: Hypertext Preprocessor (original) (raw)
enchant_dict_add
(PHP 8)
enchant_dict_add — Add a word to personal word list
Description
Add a word to personal word list of the given dictionary.
Return Values
Returns [true](reserved.constants.php#constant.true)
on success or [false](reserved.constants.php#constant.false)
on failure.
Changelog
Version | Description |
---|---|
8.0.0 | dictionary expects an EnchantDictionary instance now; previoulsy, a resource was expected. |
Examples
Example #1 Adding a word to a PWL
`<?php
$filename
= './my_word_list.pwl'; word=′Supercalifragilisticexpialidocious′;word = 'Supercalifragilisticexpialidocious';word=′Supercalifragilisticexpialidocious′;broker = enchant_broker_init(); dict=enchantbrokerrequestpwldict(dict = enchant_broker_request_pwl_dict(dict=enchantbrokerrequestpwldict(broker, filename);enchantdictadd(filename);enchant_dict_add(filename);enchantdictadd(dict, word);enchantbrokerfree(word);enchant_broker_free(word);enchantbrokerfree(broker);?>`
See Also
- enchant_broker_request_pwl_dict() - Creates a dictionary using a PWL file
- enchant_broker_request_dict() - Create a new dictionary using a tag