php8.5
Home/ Manual/ enchant / functions/ enchant_dict_add

enchant_dict_add

PHP function Edit on GitHub ✎

(PHP 8)

Add a word to personal word list

Description

enchant_dict_add(EnchantDictionary $dictionary, string $word): void

Add a word to personal word list of the given dictionary.

Parameters

word

The word to add

Return Values

Success

Changelog

VersionDescription

Examples

Adding a word to a PWL

php
<?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);

?>

See Also

Source: reference/enchant/functions/enchant-dict-add.xml · from the official PHP manual (php/doc-en)