In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Mark) wrote:
> calling empty($a) does not give a warning.
Sheesh. It doesn't at that. WTF?
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
On Sun, 16 Sep 2001 09:18:23 -0700, CC Zona wrote:
>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Mark) wrote:
>
>> >if(isset($) and !empty($a) and !$a)
>>
>> this is the same as if(!empty($a))
>>
>> >or
>> >
>> >if(isset($) and $a===FALSE)
>>
>> this is the same as if(empty($a))
>
>Aside f
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Mark) wrote:
> >if(isset($) and !empty($a) and !$a)
>
> this is the same as if(!empty($a))
>
> >or
> >
> >if(isset($) and $a===FALSE)
>
> this is the same as if(empty($a))
(Aside from accidentally omitted the "a" in the var name...oops...)
On Sat, 15 Sep 2001 13:20:59 -0700, CC Zona wrote:
>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Andrew Perevodchik) wrote:
>
>> JD> isset checks to see if the $a variable has
>> JD> been set, ie, if it exists. if($a) checks for
>> JD> the truthood of $a, meaning, if it has a
>> JD> non-ze
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Andrew Perevodchik) wrote:
> JD> isset checks to see if the $a variable has
> JD> been set, ie, if it exists. if($a) checks for
> JD> the truthood of $a, meaning, if it has a
> JD> non-zero, non-null/empty-string value, then
> JD> its true, else
JD> isset checks to see if the $a variable has
JD> been set, ie, if it exists. if($a) checks for
JD> the truthood of $a, meaning, if it has a
JD> non-zero, non-null/empty-string value, then
JD> its true, else, false.
... and if it's not set at all it returns a
warning unless you use "@" :(
--
A
14, 2001 6:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] if(isset($a)) vs if($a)
Hi. What is the difference between:
if(isset($a))
and
if($a)
??? Thanks.
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Hi. What is the difference between:
if(isset($a))
and
if($a)
??? Thanks.
David
8 matches
Mail list logo