You are here: Compare Text « All PHP « IT news, forums, messages
Compare Text

Posted by Craig Lister on 06/20/05 12:48

There is a handy function in PHP:

similar_text

I have a site that I allow users select a town, for example. If the town
doesn't exist yet, they are able to add the town.

This works well, but I find when I present the list of town to them, they
often don't see the one they are looking for, and then just add it.

If they add an already existing town, the system doesn't add it, but simply
selects it and continues. But, use the example of 'Table View' (A town in
South Africa). Lets say it is stored in the database as 'Table View'
(Correctly), and then user enters 'Tableview' (Also used)...

The similar text doesn't pick this up... And the two are added...

Is there a way to check for this? str_replace(' ', '', $thename) doesn't
help, as it breaks the rest of the similar_text checks that do actually
work.

Anyone?

 

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

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