Re: Isset
| From: | Liam Gibbs | Date: | Fri, 21 Mar 2003 19:09:05 +0000 |
| Subject: | Re: Isset | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140623@lists.php.net to get a copy of this message | ||
Responding to myself:
<<Is isset() better than $ != ""?
Often, I may have a 0 as values. While $ != "" doesn't recognize 0s (as in,
that if would be false), isset() seems to work. Should I change all my $ !=
"" to isset()s, or are there other factors I should check?>>
Conversely, what about empty(). Is that a better test for if a value could
be 0 or 1 or 2 or ABC?