This is a discussion on RE: [PHP] Correct Coding within the PHP General forums, part of the PHP Programming Forums category; Well this page will load and not always with that variable set. Is that ok, or will this code you ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|