Re: [PHP] Newbie question about good coding practice [isset]

2004-06-06 Thread Justin Patrin
Curt Zirzow wrote: * Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): When $var is 0? or $var = ''; $var = array(); $var = false; // Output: $var: $var not exists if ( $var ) echo '$var: $var exists'; else Curt or null -- paperCrane -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Curt Zirzow
* Thus wrote K.Bogac Bokeer ([EMAIL PROTECTED]): > When $var is 0? > >$var = 0; or $var = ''; $var = array(); $var = false; > > // Output: $var: $var not exists > if ( $var ) > echo '$var: $var exists'; > else Curt -- "I used to think I was indecisive, but now I'm not so

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread K.Bogac Bokeer
When $var is 0? // Output: $var: $var not exists if ( $var ) echo '$var: $var exists'; else echo '$var: $var not exists'; // Output: isset(): var exists if ( isset($var) ) echo 'isset(): $var exists'; else echo 'isset(): $var not exists'; ?> Larry E . Ullman wrote: if($

Re: [PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Larry E . Ullman
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? Yes, if you don't use isset(), you may see notices (errors) if the variable is not set. This depends upon the error reporting

[PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Al
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php