RE: [PHP] Compare Case Insensitive?

From: Date: Thu, 08 Apr 2004 15:25:50 +0000
Subject: RE: [PHP] Compare Case Insensitive?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182843@lists.php.net to get a copy of this message
if (strtolower($code) == 'abc123') { or if (strtoupper($code) == 'ABC123') { -----Original Message----- From: Jeff Oien [mailto:jeff@webdesigns1.com] Sent: 08 April 2004 4:21 PM To: PHP Subject: [PHP] Compare Case Insensitive? 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#182843) next »