Re: case-insensitive $_REQUEST,$_GET,$_POST keys?
| From: | David OBrien | Date: | Fri, 13 Apr 2012 17:22:33 +0000 |
| Subject: | Re: case-insensitive $_REQUEST,$_GET,$_POST keys? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317546@lists.php.net to get a copy of this message | ||
On Fri, Apr 13, 2012 at 1:13 PM, tamouse mailing lists <
tamouse.lists@gmail.com> wrote:
> Anyone have a quick-and-dirty way to check $_REQUEST keys that is
> case-insensitive?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
this what you asking?
foreach ( $_REQUEST as $key => $value ) {
if ( strtolower($key) in array('name','username','password'))
$data[
strtolower($key) ] = $value;
}