Re: Comparison Operator
| From: | trobi | Date: | Mon, 10 Jan 2005 19:45:03 +0000 |
| Subject: | Re: Comparison Operator | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206003@lists.php.net to get a copy of this message | ||
Chadwick, Russell wrote / napísal (a):
Could anyone tell me why this code echos? <?php $value = 0; $curval = 'A'; if ($value == $curval) { echo "WTH, Over<br>"; } ?> Try ===If you use == $value is compared to $curval $value is integer so php converts $curval to integer so it contains no digtis so it assumes that $curval=0; why it is. trobi