Manuel PHP

aspell_suggest

(PHP 4 <= 4.2.3)

aspell_suggest — Suggère l'orthographe d'un mot [Obsolète]

Description

array aspell_suggest ( int $dictionary_link , string $word )

aspell_suggest() retourne un tableau contenant les orthographes possibles d'un mot mal orthographié.

Liste de paramètres

dictionary_link

L'identifiant du lien vers le dictionnaire retourné par la fonction aspell_new().

word

Le mot testé.

Valeurs de retour

Retourne un tableau de suggestions.

Exemples

Example#1 Exemple avec aspell_suggest()

  1. <?php
  2.  
  3. $aspell_link = aspell_new("french");  
  4.  
  5. if (!aspell_check($aspell_link, "test")) { 
  6.    $suggestions = aspell_suggest($aspell_link, "test"); 
  7.  
  8.    foreach ($suggestions as $suggestion) { 
  9.       echo "Suggestions possibles :$suggestion<br />\n"; 
  10.    }  
  11. }  
  12.  
  13. ?> 


Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Breizh Blog