Re: empty variable
| From: | Jason Davidson | Date: | Mon, 20 Sep 2004 00:35:15 +0000 |
| Subject: | Re: empty variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197225@lists.php.net to get a copy of this message | ||
as suggeted the isset and empty functions are usefull,
or if you know it may be set, but could be empty, how about just
if($variable) {
}
that is the same as
if($var == "")
"Chris Mach" <cjmach@gto.net> wrote:
>
> What is the best way to determine if a variable is empty?
>
> I have a feeling there is a better way than the way I'm doing it now...
>
> if ($variable == "")
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.766 / Virus Database: 513 - Release Date: 18-Sep-2004