Re: Compare Case Insensitive?

From: Date: Thu, 08 Apr 2004 15:25:37 +0000
Subject: Re: Compare Case Insensitive?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182844@lists.php.net to get a copy of this message
let's see: eregi() preg_match() strtolower() ... either one could help you probably fastest is convert the user string to lower case and compare ... or upper case .. your choice. Damn. so many options. Thursday, April 8, 2004, 5:21:15 PM, you wrote: > How can I compare a variable submitted by a form as case > insensitive? A promotional code will be entered into a form > and it's important that they can enter the code either way. > So if I have > if ($code == 'ABC123') { > I want that to match 'aBC123' 'abc123' or whatever. Thanks. > Jeff

« previous php.general (#182844) next »