NYCPHP Meetup

NYPHP.org

[nycphp-talk] isset or not

David Mintz dmintz at davidmintz.org
Wed Feb 11 18:02:33 EST 2004


Elegant it isn't, but I suppose you could adjust error_reporting for the
duration of that block and set it back when you're done.

On Wed, 11 Feb 2004, Christopher Hendry wrote:

> I find myself testing arrays for certain values all the time (of course) -
> but sometimes the element may not be set, so to avoid the Notice that the
> index does not exist, I often wrap the test in an isset.  This seems a
> little silly to me, and I wonder if anyone has a more elegant approach to
> handling this (besides better code :) or if there is some simple PHP
> function I'm just not using...
>
> C
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>


---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list