Re: Avoiding NOTICEs on Array References

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

 



On 26 Jan 2005 Jennifer Goodie wrote:

> if (isset($fields['flags']['someflag']) && $fields['flags']['someflag'])
> if (isset($_POST['checkboxfieldname'])  && $_POST['checkboxfieldname']) 
> 
> The && short-circuits, so the second part of the conditional only
> gets evaluated if the first part is true. 

I know I can use isset, it just adds a bunch of extra code.  I like to 
find minimal solutions to these things if possible as they are easier 
to read, and faster to execute.

--
Tom

-- 
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