例子1. levenshtein() example <?php// input misspelled word$input = 'carrrot';// array of words to check against$words = array('apple','pineapple','banana','orange', 'radish','carrot','pea','bean','potato');// no shortest distance found, yet$shortest = -1;// loop through words...
www.dbjr.com.cn/shouce/php5/zh/functi... 2025-4-23