note 23909 deleted from control-structures by dams
| From: | dams@php.net | Date: | Wed, 31 Jul 2002 19:15:23 +0000 |
| Subject: | note 23909 deleted from control-structures by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34077@lists.php.net to get a copy of this message | ||
This might help anyone who is having trouble with 'if ($var1!=$var2)' not working...
if $var1 equals 01270999999 and $var2 equals 1270999999, with the $var1 being read from a dbase
column with datatype varchar, you'll find that a != doesn't work.
Not sure why, but its fixed by changing the command to 'if ($var1 !== $var2)'
I think it has something to do with the datatypes being different?