Re: case
| From: | Paul Burney | Date: | Tue, 11 Jun 2002 14:47:25 +0000 |
| Subject: | Re: case | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19746@lists.php.net to get a copy of this message | ||
on 6/11/02 10:15 AM, James Kupernik at kupernik@bcn.net appended the
following bits to my mbox:
> I want to test a value that was typed into a form, but I don't want the case
> to be a problem, how can I get around this??
This isn't a database related question, so it should probably be posted to
PHP General:
<http://www.php.net/mailing-lists.php>
That said, you can use a case insensitive regular expression to do what you
want, for example:
if (preg_match('~^ma$~i',$ShipState)) { // do something; }
You can read up at:
<http://www.php.net/manual/en/function.preg-match.php>
HTH.
Sincerely,
Paul Burney
<http://paulburney.com/>
<?php
// the statement formerly known as prince
if ($the_elevator == 'tries to bring you down') {
go_crazy('punch a higher floor');
}
?>