RE: [PHP] Correct Coding
| From: | Crane, Christopher | Date: | Thu, 07 Aug 2003 17:20:29 +0000 |
| Subject: | RE: [PHP] Correct Coding | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158690@lists.php.net to get a copy of this message | ||
Well this page will load and not always with that variable set. Is that ok,
or will this code you put output an error.
Christopher J. Crane
Network Manager - Infrastructure Services
IKON Document Efficiency at Work
755 Winding Brook Drive
Glastonbury, CT 06078
Phone - (860) 659-6464
Fax - (860) 682-6847
-----Original Message-----
From: Juan Nin [mailto:juaid@juanin.com]
Sent: Thursday, August 07, 2003 1:17 PM
To: Christopher J. Crane
Cc: php-general@lists.php.net
Subject: Re: [PHP] Correct Coding
> Is this the best way to do this?
> if(isset($Task) && $Task == "Add") { Do something }
> I want to check if the variable is set and if so, if it is "Add".
why don't just do:
if($Task == "Add") { Do something }
regards,
Juan