RE: [PHP] Correct Coding

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-07-2003
Christopher Crane
 
Posts: n/a
Default RE: [PHP] Correct Coding

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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0