You are here: Re: [PHP] Phonetic speller function « PHP « IT news, forums, messages
Re: [PHP] Phonetic speller function

Posted by Richard Lynch on 01/17/05 04:41

Dotan Cohen wrote:

> kayak. Focusing only on the 'k's I get this array: kayak, cayac. But I
> need
> kayak, kayac, cayak, cayac.

You may (or may not) be able to get something going with that extra
optional last argument to str_replace which tells how many characters to
replace.

str_replace('k', 'c', 'kayak', 1) ==> cayak

You probably should step back and use soundex, or one of the other "sound
like" modules in PHP as Greg suggested though, as a word with THREE k's in
it will maybe be too much hassle...

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация