Re: [PHP-DB] case From: Paul Burney (paul.lists <email protected>)
Date: 06/11/02

on 6/11/02 10:15 AM, James Kupernik at kupernik <email protected> 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');
}

?>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php