Re: variable test
| From: | Andrey Hristov | Date: | Thu, 21 Mar 2002 14:16:16 +0000 |
| Subject: | Re: variable test | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89499@lists.php.net to get a copy of this message | ||
>
> 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/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>