>
> if($x)
>echo $x;
if $x is not defined you will get a warning but that depends on error settings in
php.ini.
This construction checks whether $x is defined or $x is true.
>
> if(!empty($x))
>echo $x;
$x must be defined.
>
> --
> PHP General Mailing List (http://www.php.net/)
> T
Hi,
I'm asking me, what is the difference of the two "ifs".
if($x)
echo $x;
if(!empty($x))
echo $x;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2 matches
Mail list logo