Re: compare variables from text fields...
| From: | Miguel Cruz | Date: | Mon, 08 Jul 2002 04:10:51 +0000 |
| Subject: | Re: compare variables from text fields... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106024@lists.php.net to get a copy of this message | ||
On Sun, 7 Jul 2002, Jas wrote:
> What is the best function or operator to compare two text strings being
> inputted by a text field within a form? Any help is appreciated.
== is always handy.
Depending on your needs, you may want to throw in a couple calls to
strlower (if you don't care about case matching). If you are even more
flexible, look into soundex, levenshtein, metaphone, and similar_text.
They're all documented in the online manual, and each provides a different
sort of flexibility for dealing with variant spelling, etc.
miguel