Re: case-insensitive $_REQUEST,$_GET,$_POST keys?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 13, 2012 at 1:13 PM, tamouse mailing lists <
tamouse.lists@xxxxxxxxx> 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;
}

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux