Re: Correct Coding

From: Date: Thu, 07 Aug 2003 18:36:29 +0000
Subject: Re: Correct Coding
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-158711@lists.php.net to get a copy of this message
From: "Martin Peck" <mail@martinpeck.net> > > > 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 It would give an error if you have your error reporting set accordingly. Search the archives for the difference between "works" and "right" (or the next issue of PHP|Architect) :) ---John Holmes...

« previous php.general (#158711) next »