Re: Inital value of variables...
| From: | Brian Clark | Date: | Tue, 08 Aug 2000 11:29:16 +0000 |
| Subject: | Re: Inital value of variables... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10634@lists.php.net to get a copy of this message | ||
Martin Thoma wrote:
Hello ! I need to know if an variable has been set or net. I assum, that: If a variable has never been set, I can test it with if ($myVariable == 0) If $myVariable is set, it is set to a value != 0.You can always use isset(): <?php print isset($myVariable) ? $myVariable : 'Complain'; ?>
If this correct ? Is a state of a variable, which has not been used before, always equl 0 ? Regards Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net