array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.enchant-dict-add.php', 1 => 'enchant_dict_add', ), 'up' => array ( 0 => 'ref.enchant.php', 1 => 'Funciones de Enchant', ), 'prev' => array ( 0 => 'function.enchant-dict-add-to-session.php', 1 => 'enchant_dict_add_to_session', ), 'next' => array ( 0 => 'function.enchant-dict-check.php', 1 => 'enchant_dict_check', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/enchant/functions/enchant-dict-add.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 8)
enchant_dict_add — Add a word to personal word list
Add a word to personal word list of the given dictionary.
dictionary
An Enchant dictionary returned by enchant_broker_request_dict() or enchant_broker_request_pwl_dict().
word
The word to add
Versión | Descripción |
---|---|
8.0.0 |
dictionary expects an EnchantDictionary instance now;
previoulsy, a recurso was expected.
|
Ejemplo #1 Adding a word to a PWL
<?php
$filename = './my_word_list.pwl';
$word = 'Supercalifragilisticexpialidocious';
$broker = enchant_broker_init();
$dict = enchant_broker_request_pwl_dict($broker, $filename);
enchant_dict_add($dict, $word);
enchant_broker_free($broker);
?>