Re: Correct Coding

From: Date: Thu, 07 Aug 2003 18:09:20 +0000
Subject: Re: Correct Coding
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-158700@lists.php.net to get a copy of this message
> > That can generate an error if $Task was never assigned a value. > > > > could you not do > > if(@$Task == "Add" ){do something } > > to suppress the error of the variable not being set? I have never seen php give an error if $Task is not set to anything. I would have said that if ("Add" == $Task) { Do something } would always be fine - what am I missing? Martin

« previous php.general (#158700) next »