Re: Re[2]: The 'at' sign (@) variable prefix

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

 



On Wed, Oct 8, 2008 at 4:06 AM, ANR Daemon <anrdaemon@xxxxxxxxxxx> wrote:

> If you're using it to deal with possible empty input data, you'd better do it
> explicitly enstead.
>
> Something like this:
>
>  if(!array_key_exists('from_year', $_POST)
>    || !array_key_exists('from_month', $_POST)
>    || !array_key_exists('from_day', $_POST)
>    )
>  {
>    throw new Exception('No start date given', 100);
>  }

*cough*

filter_input does this elegantly too ;) as does an isset() on the array index

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


[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