答复: [PHP] empty() problem
| From: | yangshiqi | Date: | Mon, 13 Dec 2004 06:10:34 +0000 |
| Subject: | 答复: [PHP] empty() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204136@lists.php.net to get a copy of this message | ||
Maybe this can help you.
If (empty((string)$Game_rating))
……
-----邮件原件-----
发件人: Ahmed Abdel-Aliem [mailto:me2resh@gmail.com]
发送时间: 2004年12月12日 21:58
收件人: php-general@lists.php.net
主题: [PHP] empty() problem
Hi Group Members
i have a problem with function empty()
i use it to check if user entered the form fields and store it in array
for example :
if (empty($Game_rating))
$errors[] = "You didn't enter the Online Status for the Game.";
the problem when the user enters 0 in the form field
the empty function returns the error.
can i use another function that doesn't return false when the 0 is passes ?
any help plz ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php